# How to create resusable CUSTOM global content

**URL:** <https://community.hubspot.com/t/how-to-create-resusable-custom-global-content/104078>\
**Category:** CMS Development\
**Tags:** professional\
**Created:** [April 4, 2024, 8:12am UTC](https://community.hubspot.com/t/how-to-create-resusable-custom-global-content/104078 "2024-04-04T08:12:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![stupkad](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stupkad/32/63860_2.png) [@stupkad](https://community.hubspot.com/u/stupkad)\
**Post date:** [April 4, 2024, 8:12am UTC](https://community.hubspot.com/t/how-to-create-resusable-custom-global-content/104078/1 "2024-04-04T08:12:19Z")

</div>

What is the best way, to provide different global content “snippets” to editors?

These layout of these content snippets are very different - dnd areas are required, where the editor can create whatever layout needed. These content snippets should be useable in different pages, and provide the possibility to be editable “globally” like any other global content.

Section templates sound useful, but do not have a global option.

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [April 4, 2024, 11:39am UTC](https://community.hubspot.com/t/how-to-create-resusable-custom-global-content/104078/2 "2024-04-04T11:39:56Z")

</div>

Hi @stupkad,

If you have HubDB, you could use it for your snippets.

Create custom modules and put the HubDB infprmation there. Once done you could set up a dropdown or even a text(not rich-text) field to “search” your HubDB and provide the content based on dropdown option/text input.

Another option which would be possible but is not that “userfriendly” since your users/marketers will need access to the design-tools is setting up a file with all of your content and use the variables in the templates/modules

E.g:

```lia-code-sample
{# simple HTML file somewhere in your theme #}

<!--
templateType: "none"
isAvailableForNewContent: false
-->

{% set headline_A = "Lorem ipsum" %}
{% set image_A_path = "loremipsum.com/path-to-image.png" %}

{% set headline_B = "Lorem ipsum dolor" %}
{% set image_B_path = "loremipsumdolor.com/path-to-image.png" %}

...

```

Make sure to include this file in the templates you’d like to provide those variables. If you want to make them available in every template import it in the base.html/layout.html file

Once imported you should be able to use them like

```lia-code-sample
{{ headline_A }}
<img src={{ image_A_path }} alt="">

{{ headline_B }}
<img src={{ image_B_path }} alt="">

```

in elements like the rich-text (put them in the source-code view)

Another option would be to create a (global) module with all of your options and put it with [export\_to\_template\_context](https://developers.hubspot.com/docs/cms/building-blocks/modules/export-to-template-context) into the template(s) and grab the info through other modules.

best,

Anton

---

<div class="post-metadata">

**Author:** ![stupkad](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stupkad/32/63860_2.png) [@stupkad](https://community.hubspot.com/u/stupkad)\
**Post date:** [April 4, 2024, 11:42am UTC](https://community.hubspot.com/t/how-to-create-resusable-custom-global-content/104078/3 "2024-04-04T11:42:50Z")

</div>

Hi Anton, thanks for your reply, but did you read my question?

I am looking for a solution which supports dbd areas…

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [April 4, 2024, 12:10pm UTC](https://community.hubspot.com/t/how-to-create-resusable-custom-global-content/104078/4 "2024-04-04T12:10:24Z")

</div>

Yes, I’ve read your question. Based on your request it’s quite hard to provide a more precise answer. If you could provide a more detailed usecase I’ll be happy to provide more detailed possible solutions.

Also: Those were simple examples but you could do that with dnd areas as well.

Option A:

Put your dnd\_area layout into a rich-text element of a HubDB and provide a select option in a module.

Option B:  
Put your dnd\_area layout into a html file and import it in the template

Option C:  
Write your dnd\_areas in one file wrapped in an if-elif-endif statemenet and show/hide them based on a module setting with export\_to\_template\_context.

best,

Anton

---

<div class="post-metadata">

**Author:** ![GRajput](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/grajput/32/102020_2.png) [@GRajput](https://community.hubspot.com/u/GRajput)\
**Post date:** [April 8, 2024, 3:48pm UTC](https://community.hubspot.com/t/how-to-create-resusable-custom-global-content/104078/5 "2024-04-08T15:48:39Z")

</div>

Hi @stupkad

You can use global modules for your global content. You can refer to this doc for more info

> **[Use global content across multiple templates](https://knowledge.hubspot.com/design-manager/use-global-content-across-multiple-templates)**
>
> Learn how to use and edit global content in the content editor and in the design manager.

Thanks!
