menu

SiteGenesis / Server-side JS / Module: models/ContentModel

Model for managing content assets.

module:models/ContentModel

The content class

Source:
Source:

Classes

ContentModel

Methods

(inner) ContentModel/get(parameter) → {module:models/ContentModel~ContentModel}

Gets a new instance for a given content asset.

Parameters:
Name Type Description
parameter dw.content.Content | String

The content object to enhance/wrap or the content ID of the content object.

Source:
Returns:
Type
module:models/ContentModel~ContentModel

(inner) ContentModel/getDefaultFolder() → {dw.content.Folder}

Returns the default folder. This is either the classification folder or the first folder the asset is assigned to.

Source:
Returns:

The default folder for this asset

Type
dw.content.Folder

(inner) ContentModel/getFolderPath() → {Array}

Returns an array containing the folder path of the default folder.

Source:
Returns:

The fodler path for this asset

Type
Array

Get navigation link from custom attribute "pipelineLink" or creating new link of content page for current asset.

Source:
Returns:

URL to page rendered by the page.ds controller Show function for the current content asset.

Type
String

(inner) ContentModel/getMarkup() → {String}

Returns actual markup of the content asset if it is defined, otherwise returns an empty string.

Source:
Returns:

b

Type
String

(inner) ContentModel/isInFolder(folderId) → {Boolean}

Checks whether current content asset is in the specified folder.

Parameters:
Name Type Description
folderId String

The folder id.

Source:
Returns:

true if current content asset is in the specified folder.

Type
Boolean

X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.