Syntax

Platform.Function.ContentAreaByName(name[, regionName, stopOnError, fallbackContent])
1–4 arguments

Parameters

Name Type Required Description
name string Yes Name of the Content Area (folder path notation, e.g. "My Content\myArea").
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.ContentAreaByName() retrieves and renders content from a classic (legacy) SFMC Content Area identified by its name.

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.ContentBlockByName() instead.

Difference from the global ContentAreaByName() form

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

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

See ContentAreaByName (global) for the global variant.

Examples

var content = Platform.Function.ContentAreaByName("My Content\\myContentArea");
Platform.Response.Write(content);
var content = Platform.Function.ContentAreaByName("My Content\\myContentArea", "impressionRegion", false, "Fallback text here");
Platform.Response.Write(content);

See Also