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 Content → Custom 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 Type | Description |
|---|---|
| Code | Write raw HTML using the CodeMirror code editor. This is the default |
| Visual | Use 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
| Field | Required | Description |
|---|---|---|
| Name | Yes | A descriptive name for this content block (max 255 characters) |
| Macro | Yes | The 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 |
| Description | No | An optional description of what this content block is for (max 255 characters) |
| Category | Yes | The category this content belongs to. Categories are managed under Administration → Settings → Categories → Custom Content Categories |
| Available for All Publications | No | When enabled, this content is available across every publication. When disabled, you must select specific publications |
| Associated Publications | Conditional | Required 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.
| Column | Filter Type | Default |
|---|---|---|
| ID | Number | Shown |
| Name | Text | Shown |
| Description | Text | Shown |
| Macro | Text | Shown |
| Content | Text | Hidden |
| Category | Select | Shown |
| Publications | Select | Shown |
| All Publications | Boolean | Shown |
| Created | Date | Hidden |
| Updated | Date | Shown |
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 Administration → Settings → Categories → Custom Content Categories.
Each category has:
| Field | Required | Description |
|---|---|---|
| Name | Yes | The category name (must be unique) |
| Description | No | An optional description |
| Parent Category | No | An optional parent category for nesting |
Updated 10 days ago
