ContentArea()

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 ContentBlockById() function.

ContentArea(contentAreaId, impressionRegionName, boolErrorOnMissingContentArea, errorMessage, statusCode)

The ContentArea() function has five parameters:

  • contentAreaId (string or number): Required. The ID of the content area to retrieve.
  • impressionRegionName (string): The name of the impression region to associate with the content area.
  • boolErrorOnMissingContentArea (boolean): Determines whether the function returns an error when the system can’t locate the specified content area or returns an invalid content area. A value of true returns an error. Defaults to true.
  • errorMessage (string): Default content to return if an error occurs. Defaults to an empty string.
  • statusCode (number): An output variable that contains the exit code of the function. 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.