Handlebar Helper Function: GetContentBlock

Retrieve and render a content block within a template.

Availability 

This helper is available in the Summer ’26 release of Marketing Cloud Next (API version 67.0).

Syntax 

1{{getcontentblock key="contentKey"}}

Parameters 

ParameterTypeDescription
keyStringRequired. The unique identifier of the content block to retrieve.

Return Value 

The function returns the rendered content of the specified content block. For HTML rendering contexts, it returns the HTML part of the content. For other contexts, it returns the text part. If the content block can’t be retrieved, the function throws an exception.

Locale Support 

The helper automatically extracts the locale from the rendering context. If any language-specific content variants are available, the function retrieves them based on the locale information.

Usage Examples 

This example retrieves and renders a content block.

1{{getcontentblock key="abc123"}}

Providing a Fallback Value 

The function throws an exception if the specified content block doesn’t exist, so it’s a good idea to provide a fallback. This example provides a default if the content block isn’t found.

1{{fallback (getcontentblock key="footerblock") "Copyright 2026 Northern Trail Outfitters"}}

Using in Conditional Blocks 

It’s often useful to render specific content blocks based on the properties of the recipient. This example conditionally includes a content block when a variable evaluates to true.

1{{#if isPreferredCustomer}}
2  {{getcontentblock key="preferred-customer-banner"}}
3{{/if}}

See Also