Script: Class dw.content.Content
Class Content
- Object
- dw.object.PersistentObject
- dw.object.ExtensibleObject
- dw.content.Content
- dw.object.ExtensibleObject
- dw.object.PersistentObject
Class representing a Content asset in Commerce Cloud Digital.
Properties
classificationFolder : Folder Read Only
The Folder associated with this Content. The folder is used to determine the classification of the content.
description : String Read Only
The description in the current locale or null.
folders : Collection Read Only
All folders to which this content is assigned.
ID : String Read Only
The ID of the content asset.
name : String Read Only
The name of the content asset.
online : boolean Read Only
The online status of the content.
onlineFlag : boolean Read Only
The online status flag of the content.
page : boolean Read Only
Returns if the content is a Page or not.
pageDescription : String Read Only
The page description for the content in the current locale or null if there is no page description.
pageKeywords : String Read Only
The page keywords for the content in the current locale or null if there is no page title.
pageMetaTags : Array Read Only
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
The page title for the content in the current locale or null if there is no page title.
pageURL : String Read Only
The page URL for the content in the current locale or null if there is no page URL.
searchable : boolean Read Only
The search status of the content.
searchableFlag : boolean Read Only
The online status flag of the content.
siteMapChangeFrequency : String Read Only
The contents change frequency needed for the sitemap creation.
siteMapIncluded : Number Read Only
The status if the content is included into the sitemap.
siteMapPriority : Number Read Only
The contents priority needed for the sitemap creation. If no priority is defined, the method returns 0.0.
template : String Read Only
The value of attribute 'template'.
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
getClassificationFolder() : Folder
Returns the Folder associated with this Content.
getDescription() : String
Returns the description in the current locale or null.
getFolders() : Collection
Returns all folders to which this content is assigned.
Returns the ID of the content asset.
Returns the name of the content asset.
getOnlineFlag() : boolean
Returns the online status flag of the content.
Returns the page description for the content in the current locale or null if there is no page description.
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.
getPageMetaTags() : Array
Returns all page meta tags, defined for this instance for which content can be generated.
getPageTitle() : String
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.
getSearchableFlag() : boolean
Returns the online status flag of the content.
getSiteMapChangeFrequency() : String
Returns the contents change frequency needed for the sitemap creation.
Returns the status if the content is included into the sitemap.
Returns the contents priority needed for the sitemap creation.
getTemplate() : String
Returns the value of attribute 'template'.
isOnline() : boolean
Returns the online status of the content.
isPage() : boolean
Returns if the content is a Page or not.
isSearchable() : boolean
Returns the search status of the content.
Converts the content into the Page representation if isPage() yields true.
Methods inherited from class ExtensibleObject
Methods inherited from class PersistentObject
getCreationDate, getLastModified, getUUID
Methods inherited from class Object
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
Method Detail
getClassificationFolder
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
getDescription() : String
Returns the description in the current locale or null.
Returns:
the description in the current locale or null.
getFolders
getFolders() : Collection
Returns all folders to which this content is assigned.
Returns:
Collection of Folder objects.
getID
getID() : String
Returns the ID of the content asset.
Returns:
the ID of the content asset.
getName
getName() : String
Returns the name of the content asset.
Returns:
the name of the content asset.
getOnlineFlag
getOnlineFlag() : boolean
Returns the online status flag of the content.
Returns:
true if the content is online, false otherwise.
getPageDescription
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
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
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
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
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
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
getSearchableFlag() : boolean
Returns the online status flag of the content.
Returns:
true if the content is searchable, false otherwise.
getSiteMapChangeFrequency
getSiteMapChangeFrequency() : String
Returns the contents change frequency needed for the sitemap creation.
Returns:
The contents sitemap change frequency.
getSiteMapIncluded
getSiteMapIncluded() : Number
Returns the status if the content is included into the sitemap.
Returns:
the value of the attribute 'siteMapIncluded'
getSiteMapPriority
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
getTemplate() : String
Returns the value of attribute 'template'.
Returns:
the value of the attribute 'template'
isOnline
isOnline() : boolean
Returns the online status of the content.
Returns:
true if the content is online, false otherwise.
isPage
isPage() : boolean
Returns if the content is a Page or not.
Returns:
true if the content is a Page, false otherwise.
isSearchable
isSearchable() : boolean
Returns the search status of the content.
Returns:
true if the content is searchable, false otherwise.
toPage
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: