ContentBlockByID

Overview

Retrieve content from a specified content block in Content Builder

Syntax

ContentBlockByID(1, 2, 3, 4)

Function Properties

Ordinal Type Description
1 string Required ID for content block
2 string Impression region for content
3 Boolean Indicates whether a call proceeds if it fails to retrieve content. A value of true returns an exception and terminates the call. A value of false allows the call to proceed.
4 string Default content to display if the call does not return content from the specified content area

Example

<script runat="server">
     var content = Platform.Function.ContentBlockByID("12345","impressionRegion",false,"defaultContentHere");
</script>
Last Updated: Jun 8, 2021