ContentAreaByName()
Returns content from a classic content area.
This function retrieves classic content areas, which are no longer supported in Marketing Cloud Engagement. As a result, this function doesn’t retrieve any content and shouldn’t be used. This documentation is retained for historical purposes.
To retrieve content blocks created in Content Builder, use the ContentBlockByName() function.
| Marketing Cloud Engagement | ✅ Yes |
| Marketing Cloud Next | ❌ No |
ContentAreaByName(contentAreaName, impressionRegionName, boolErrorOnMissingContentArea, errorMessage, statusCode)
The ContentAreaByName() function has five parameters:
contentAreaName(string): Required. The name of the content area to retrieve.impressionRegionName(string): The name of the impression region to associate with the content area.boolErrorOnMissingContentArea(boolean): Iftrue, the function returns an error if the content area can’t be found. Iffalse, the function doesn’t return an error. The default value istrue.errorMessage(string): The content to return if an error occurs while retrieving the content area.statusCode(number): An output variable that contains the exit code of the function. A value of0indicates the function found the content area and successfully rendered the content. A value of-1indicates either no content or an invalid content area.