Custom Content

Custom content blocks are reusable pieces of HTML that can be inserted into pages, templates, and messages using macros. Instead of duplicating the same content across multiple locations, you define it once as custom content and reference it with a macro like {$custom_sidebar} — when the page renders, the macro is replaced with the stored content.

Navigate to ContentCustom Content

Creating Custom Content

Click the Create button to open the custom content form. The form has two sections: Options and Content.

Editor Type

Before filling out the form, choose an editor type at the top:

Editor TypeDescription
CodeWrite raw HTML using the CodeMirror code editor. This is the default
VisualUse the TinyMCE rich text editor for a WYSIWYG experience

Editor type cannot be changed after creation. Choose the one that best fits your content before saving.

Options

FieldRequiredDescription
NameYesA descriptive name for this content block (max 255 characters)
MacroYesThe macro identifier used to reference this content. Prefixed with $custom_ automatically — you only enter the suffix. Only alphanumeric characters and underscores are allowed. Must be unique across all custom content
DescriptionNoAn optional description of what this content block is for (max 255 characters)
CategoryYesThe category this content belongs to. Categories are managed under AdministrationSettingsCategoriesCustom Content Categories
Available for All PublicationsNoWhen enabled, this content is available across every publication. When disabled, you must select specific publications
Associated PublicationsConditionalRequired when Available for All Publications is off. Select one or more publications that can use this content

Content

Write or paste your content in the editor. The editor type (Code or Visual) is determined by the toggle you selected at the top of the form. Your content can include other macros — they will be resolved when the page renders.

Preview

Click Preview Content below the editor to see a rendered preview with all macros replaced. This opens a dialog showing exactly how the content will appear when inserted into a page or template.

Using Custom Content Macros

Once created, a custom content block can be inserted anywhere macros are supported by using its macro wrapped in curly braces:

{$custom_sidebar}

Where macros can be used

  • Pages — in the GrapesJS visual editor content
  • Templates — in message, auto-responder, and page templates
  • Messages and auto-responders — via template content
  • Other custom content — macros can be nested inside other custom content blocks

Inserting macros in the editor

When editing a page or template in the GrapesJS editor, click the Macros button to open the macro selector. The Custom Content tab shows all available custom content blocks with their name, description, category, and macro. Click a row to insert the macro into your content.

You can filter the list by category and expand any row to preview the rendered content or view its source.

List View

The custom content list displays all blocks in a searchable, filterable data table.

ColumnFilter TypeDefault
IDNumberShown
NameTextShown
DescriptionTextShown
MacroTextShown
ContentTextHidden
CategorySelectShown
PublicationsSelectShown
All PublicationsBooleanShown
CreatedDateHidden
UpdatedDateShown

Additional Features

  • Auto-save — unsaved changes are automatically saved periodically
  • Copy — duplicate an existing custom content block to use as a starting point for a new one
  • Record locking — when someone is editing a custom content block, it is locked to prevent conflicting changes

Managing Categories

Custom content categories help organize your content blocks. Categories are managed separately under AdministrationSettingsCategoriesCustom Content Categories.

Each category has:

FieldRequiredDescription
NameYesThe category name (must be unique)
DescriptionNoAn optional description
Parent CategoryNoAn optional parent category for nesting