A preview URL contains dynamic parameters, which at runtime, are replaced by property values, then passed to the page. Parameters can reference Special Properties and asset properties.

Special Properties

The following table shows the special properties that the preview URL can include:

Property

Description

$id

The asset’s repository ID or the absolute path of a file.

$projectId

The project ID, empty if there is no current project.

$componentPath

The Nucleus path of the repository or virtual file system.

$itemType

The item descriptor name for repository items or file type for files.

For example, given the following URL, $id resolves to a repository item’s ID:

http://www.myStore/women/Clothing.jsp?prodId=$id

Referencing Asset Properties

Dynamic parameters can be set to any property of the previewed asset with the following notation:

parameter=$[property-name]

For example:

http://www.myStore/women/Clothing.jsp?prodID=$id&name=$[displayName]

The prodID parameter resolves to the value of $id, while the name parameter is assigned the asset’s displayName property.

Referencing Asset Subproperties

Asset Manager preview lets you set parameters to asset subproperties—that is, properties that are themselves the values of other properties. This lets you access product items with greater specificity. For example, the following URL supplies the parameter $[template.url], in order to obtain the value of the subproperty url:

http://www.myStore/women/$[template.url]?prodId=$id&name=$[displayName]

If you have several product templates, saving each template to the product itself and using a pointer to the template property in the URL ensures that the correct template is used.

 
loading table of contents...