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

Use the following notation to set dynamic parameters to any property of the previewed asset:

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.

Subproperties are properties that are the values of other properties. Referencing a subproperty can help you specify products for preview with greater granularity.

Use the following notation to reference subproperties:

parameter=$[property-name.subproperty-name]

For example, the following URL supplies the parameter $[template.url]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.


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices