Model for managing content assets.
module:models/ContentModel
The content class
Classes
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. |
Returns:
(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.
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.
Returns:
The fodler path for this asset
- Type
- Array
(inner) ContentModel/getLink() → {String}
Get navigation link from custom attribute "pipelineLink" or creating new link of content page for current asset.
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.
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. |
Returns:
true if current content asset is in the specified folder.
- Type
- Boolean