Syntax

Platform.Function.ContentArea(id[, regionName, stopOnError, 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.
stopOnError boolean No When true, throws on retrieval failure; when false, the call continues.
fallbackContent string No Content to display when the area cannot be retrieved.

Description

Platform.Function.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.

Difference from the global ContentArea() form

The bare-name global ContentArea() function accepts the same first two parameters but differs in the 3rd and 4th:

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

See ContentArea (global) for the global variant.

Examples

var content = Platform.Function.ContentArea(123456);
Platform.Response.Write(content);
var content = Platform.Function.ContentArea(123456, "impressionRegion", false, "Fallback text here");
Platform.Response.Write(content);

See Also