ContentBlockByName

Overview

Retrieve content from a specified content block in Content Builder. This function will only work with shared content in a business unit if it is shared using a shared folder.

Syntax

ContentBlockByName(1, 2, 3, 4, 5)

Function Properties

OrdinalTypeDescription
1stringRequiredName of the content block to return, including the path within the my contents folder if necessary
2stringImpression region for content
3BooleanIndicates whether the function returns an error when the system cannot locate the specified content area or returns an invalid content area. A value of true returns an error. A value of false does not return an error.
4stringDefault content to return if an error occurs and no error returns. This value defaults to an empty string.
5stringReturns the status of the call. A value of 0 indicates the function found the content area and successfully rendered the content. A value of -1 indicates either no content or an invalid content area, so the function returns the default content value.

Example