ContentAreaByName

Returns the content stored in the specified content area.

Syntax

ContentAreaByName(1, 2, 3, 4)

Properties

Ordinal Type Description
1 String Required. The name of the content area.
2 String The name of an impression region that’s contained in the specified content area.
3 String The error message to deliver if the function can’t return content.
4 String The content area to display if the function can’t find other content.

Example

In this example, the variable gets the information from the specified content area. The content isn’t written to the email or landing page you create. Instead, the content resides in the variable for use as any other string.

var myContent = ContentAreaByName("myContentArea");

Combine this function with the Write() function to output the content area in your message or site.

<script runat="server">
  var myContent = ContentAreaByName("myContentArea");
  Write(myContent);
</script>

See Also