Syntax

ContentArea(id[, regionName, errorMsg, fallbackContent])
1–4 arguments

Parameters

Name Type Required Description
id number Yes Numeric ID of the Content Area.
regionName string No Impression region for content tracking.
errorMsg string No Error message returned as a string on retrieval failure.
fallbackContent string No Content to display when the area cannot be retrieved.

Description

ContentArea() retrieves and renders content from a classic (legacy) SFMC Content Area identified by its numeric ID.

This function is deprecated. Classic Content Areas are no longer supported on modern SFMC infrastructure. Migrate content to Content Builder blocks and use Platform.Function.ContentBlockByID() instead.

Requires Platform.Load: This global form requires Platform.Load("core", "1.1.5") before use. The qualified Platform.Function.ContentArea() form does not.

Difference from Platform.Function.ContentArea()

  ContentArea() (global) Platform.Function.ContentArea()
3rd parameter errorMsg: string stopOnError: boolean
Requires Platform.Load Yes — Platform.Load("core", "1.1.5") No

See Platform.Function.ContentArea for the qualified variant.

Examples

Platform.Load("core", "1.1.5");
var content = ContentArea(123456);
Platform.Response.Write(content);
Platform.Load("core", "1.1.5");
var content = ContentArea(123456, "impressionRegion", "Could not load content area", "Fallback text here");
Platform.Response.Write(content);

See Also