ContentAreaByName

Returns the content stored in the specified content area.

Syntax 

ContentAreaByName(1, 2, 3, 4)

Properties 

OrdinalTypeDescription
1StringRequired. The name of the content area.
2StringThe name of an impression region that’s contained in the specified content area.
3StringThe error message to deliver if the function can’t return content.
4StringThe 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.

1var myContent = ContentAreaByName("myContentArea");

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

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

See Also