TreatAsContentArea()

Treats content retrieved from a data extension or other source as though it’s fixed content coming from a content area.

The TreatAsContentArea() function has three parameters:

  • contentKey (string): Required. The key value that’s used to identify the content specified in the second string. Because the function treats a key in a text content as distinct from a key in an HTML context, use the same key to identify distinct text and HTML versions of the content. The function processes all keys in a case-insensitive manner.
  • contentValue (string): Required. Content stored for an email send under the key specified in the first string. You can retrieve content using the HttpGet() or Lookup() functions.
  • impressionRegion (string): The name of the impression region for the virtual content area.

The maximum number of virtual content blocks is 300.

This example pulls content from a data extension and saves it for reuse as a virtual content area under the key VirtualCA1:

This example pulls content from a data extension and saves it for reuse as a virtual content area under a key specified through the KeyValue attribute or data extension field.

This example pulls content from a data extension, saves it for reuse as a virtual content area under the key VirtualCA1, and assigns it the impression region name of Impression Region One: