---
schema_version: "1"
id: 2e1f9f14a0d1589d9040b04d517b83c812b8d8f82524e853683c08dd1437b1c3
title: ContentAreaByName
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-programmatic-content/ssjs_platformContentContentAreaByName.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_platformContentContentAreaByName.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: c865a520b2c798a5947b78637bf634b73f1168e4e12324af603119c24f1b4d79
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# ContentAreaByName

Retrieve content from a specified content area.

## Syntax

ContentAreaByName(1, 2, 3, 4)

## Function Properties

<!--complex table-->

| Ordinal | Type    |              | Description                                                                                                                                                                   |
| ------- | ------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **1**   | string  | **Required** | Name of content area                                                                                                                                                          |
| **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.ContentAreaByName("My Content\\myContentArea","impressionRegion",false,"defaultContentHere");
</script>
```
