Class Content

Class representing a Content asset in Commerce Cloud Digital.

PropertyDescription
ID: String (read-only)Returns the ID of the content asset.
classificationFolder: Folder (read-only)Returns the Folder associated with this Content.
description: String (read-only)Returns the description in the current locale or null.
folders: Collection (read-only)Returns all folders to which this content is assigned.
name: String (read-only)Returns the name of the content asset.
online: Boolean (read-only)Returns the online status of the content.
onlineFlag: Boolean (read-only)Returns the online status flag of the content.
page: Boolean (read-only)Returns if the content is a Page or not.
pageDescription: String (read-only)Returns the page description for the content in the current locale or null if there is no page description.
pageKeywords: String (read-only)Returns the page keywords for the content in the current locale or null if there is no page title.
pageMetaTags: Array (read-only)Returns all page meta tags, defined for this instance for which content can be generated.
pageTitle: String (read-only)Returns the page title for the content in the current locale or null if there is no page title.
pageURL: String (read-only)Returns the page URL for the content in the current locale or null if there is no page URL.
searchable: Boolean (read-only)Returns the search status of the content.
searchableFlag: Boolean (read-only)Returns the online status flag of the content.
siteMapChangeFrequency: String (read-only)Returns the contents change frequency needed for the sitemap creation.
siteMapIncluded: Number (read-only)Returns the status if the content is included into the sitemap.
siteMapPriority: Number (read-only)Returns the contents priority needed for the sitemap creation.
template: String (read-only)Returns the value of attribute 'template'.

This class does not have a constructor, so you cannot create it directly.

MethodDescription
getClassificationFolder()Returns the Folder associated with this Content.
getDescription()Returns the description in the current locale or null.
getFolders()Returns all folders to which this content is assigned.
getID()Returns the ID of the content asset.
getName()Returns the name of the content asset.
getOnlineFlag()Returns the online status flag of the content.
getPageDescription()Returns the page description for the content in the current locale or null if there is no page description.
getPageKeywords()Returns the page keywords for the content in the current locale or null if there is no page title.
getPageMetaTag(String)Returns the page meta tag for the specified id.
getPageMetaTags()Returns all page meta tags, defined for this instance for which content can be generated.
getPageTitle()Returns the page title for the content in the current locale or null if there is no page title.
getPageURL()Returns the page URL for the content in the current locale or null if there is no page URL.
getSearchableFlag()Returns the online status flag of the content.
getSiteMapChangeFrequency()Returns the contents change frequency needed for the sitemap creation.
getSiteMapIncluded()Returns the status if the content is included into the sitemap.
getSiteMapPriority()Returns the contents priority needed for the sitemap creation.
getTemplate()Returns the value of attribute 'template'.
isOnline()Returns the online status of the content.
isPage()Returns if the content is a Page or not.
isSearchable()Returns the search status of the content.
toPage()Converts the content into the Page representation if isPage() yields true.

describe, getCustom

getCreationDate, getLastModified, getUUID

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

ID: String (read-only)

Returns the ID of the content asset.


classificationFolder: Folder (read-only)

Returns the Folder associated with this Content. The folder is used to determine the classification of the content.


description: String (read-only)

Returns the description in the current locale or null.


folders: Collection (read-only)

Returns all folders to which this content is assigned.


name: String (read-only)

Returns the name of the content asset.


online: Boolean (read-only)

Returns the online status of the content.


onlineFlag: Boolean (read-only)

Returns the online status flag of the content.


page: Boolean (read-only)

Returns if the content is a Page or not.


pageDescription: String (read-only)

Returns the page description for the content in the current locale or null if there is no page description.


pageKeywords: String (read-only)

Returns the page keywords for the content in the current locale or null if there is no page title.


pageMetaTags: Array (read-only)

Returns all page meta tags, defined for this instance for which content can be generated.

The meta tag content is generated based on the content detail page meta tag context and rules. The rules are obtained from the current content or inherited from the default folder, up to the root folder.


pageTitle: String (read-only)

Returns the page title for the content in the current locale or null if there is no page title.


pageURL: String (read-only)

Returns the page URL for the content in the current locale or null if there is no page URL.


searchable: Boolean (read-only)

Returns the search status of the content.


searchableFlag: Boolean (read-only)

Returns the online status flag of the content.


siteMapChangeFrequency: String (read-only)

Returns the contents change frequency needed for the sitemap creation.


siteMapIncluded: Number (read-only)

Returns the status if the content is included into the sitemap.


siteMapPriority: Number (read-only)

Returns the contents priority needed for the sitemap creation. If no priority is defined, the method returns 0.0.


template: String (read-only)

Returns the value of attribute 'template'.


getClassificationFolder(): Folder

Returns the Folder associated with this Content. The folder is used to determine the classification of the content.

Returns:

  • the classification Folder.

getDescription(): String

Returns the description in the current locale or null.

Returns:

  • the description in the current locale or null.

getFolders(): Collection

Returns all folders to which this content is assigned.

Returns:

  • Collection of Folder objects.

getID(): String

Returns the ID of the content asset.

Returns:

  • the ID of the content asset.

getName(): String

Returns the name of the content asset.

Returns:

  • the name of the content asset.

getOnlineFlag(): Boolean

Returns the online status flag of the content.

Returns:

  • true if the content is online, false otherwise.

getPageDescription(): String

Returns the page description for the content in the current locale or null if there is no page description.

Returns:

  • the page description for the content in the current locale or null if there is no page description.

getPageKeywords(): String

Returns the page keywords for the content in the current locale or null if there is no page title.

Returns:

  • the page keywords for the content in the current locale or null if there is no page title.

getPageMetaTag(id: String): PageMetaTag

Returns the page meta tag for the specified id.

The meta tag content is generated based on the content detail page meta tag context and rule. The rule is obtained from the current content or inherited from the default folder, up to the root folder.

Null will be returned if the meta tag is undefined on the current instance, or if no rule can be found for the current context, or if the rule resolves to an empty string.

Parameters:

  • id - the ID to get the page meta tag for

Returns:

  • page meta tag containing content generated based on rules

getPageMetaTags(): Array

Returns all page meta tags, defined for this instance for which content can be generated.

The meta tag content is generated based on the content detail page meta tag context and rules. The rules are obtained from the current content or inherited from the default folder, up to the root folder.

Returns:

  • page meta tags defined for this instance, containing content generated based on rules

getPageTitle(): String

Returns the page title for the content in the current locale or null if there is no page title.

Returns:

  • the page title for the content in the current locale or null if there is no page title.

getPageURL(): String

Returns the page URL for the content in the current locale or null if there is no page URL.

Returns:

  • the page URL for the content in the current locale or null if there is no page URL.

getSearchableFlag(): Boolean

Returns the online status flag of the content.

Returns:

  • true if the content is searchable, false otherwise.

getSiteMapChangeFrequency(): String

Returns the contents change frequency needed for the sitemap creation.

Returns:

  • The contents sitemap change frequency.

getSiteMapIncluded(): Number

Returns the status if the content is included into the sitemap.

Returns:

  • the value of the attribute 'siteMapIncluded'

getSiteMapPriority(): Number

Returns the contents priority needed for the sitemap creation. If no priority is defined, the method returns 0.0.

Returns:

  • The contents sitemap priority.

getTemplate(): String

Returns the value of attribute 'template'.

Returns:

  • the value of the attribute 'template'

isOnline(): Boolean

Returns the online status of the content.

Returns:

  • true if the content is online, false otherwise.

isPage(): Boolean

Returns if the content is a Page or not.

Returns:

  • true if the content is a Page, false otherwise.

isSearchable(): Boolean

Returns the search status of the content.

Returns:

  • true if the content is searchable, false otherwise.

toPage(): Page

Converts the content into the Page representation if isPage() yields true.

Returns:

  • the Page representation of the content if it is a page, null otherwise.

See Also: