Using Variables
What is a Variable?
A variable is a placeholder that allows you to reference a page property or component property. Both Dynamic Text components and Custom Display Lists use variables to return properties without formatting (HTML markup).
Creating List Templates with Variables
When creating a list template, any combination of the following elements is possible: plain text, HTML and variables. Keep in mind that the more complex the list template, the more styling will likely be required to make the custom list look cohesive.
Page Properties
Name | Description |
---|---|
${jcr:description} | Returns the page's description, as entered in the Description text area in the Page Properties. |
${jcr:title} | Returns the page's title, as entered in the Title field in the Page Properties. |
${subtitle} | Returns the page's subtitle, as entered in the Subtitle field in the Page Properties. |
${navTitle} | Returns the page's left-hand navigation title, as entered in the Navigation Title field in the Page Properties. |
${cq:lastModifiedBy} | Returns the 間眅埶AV Computing ID of the last person who modified the page. |
${pageTitle} | Returns the page's title, as entered in the Page Title field in the Page Properties. |
${jcr:createdBy} | Returns the 間眅埶AV Computing ID of the person who created the page. |
${cq:lastModified} | Returns the time stamp for when the page was last modified. |
${firstTag} | Returns the page's first tag, as entered in the page properties. |
${tags} | Returns all the tags, as entered in the page properties. |
${thumbnail} | Returns an image sourced from the thumbnail field of the page properties. |
${href} | Returns the page's relative URL, e.g., /content/sfu/cms/howto/advanced/build-a-page/variable.html |
${pageImage} | Returns the original image sourced from the Image tab in the page properties. |
${pageImageCrop} | Returns the cropped image sourced from the Image tab in the page properties. |
${pagePath} |
Returns the page's path, e.g., /content/sfu/cms/howto/advanced/build-a-page/variable |
${parentTitle} |
Returns the page title of its parent page. |
Date Stamp Component
Name | Description |
---|---|
${datestamp} | Returns the date of the Date Stamp component, e.g., November 05, 2013. The page must contain a Date Stamp component for this variable to work. |
${datestamp-medium} | Returns the date of the Date Stamp component in the medium format, e.g., Nov 5, 2013. |
${datestamp-short} | Returns the date of the Date Stamp component in the short format, e.g., 11/5/13. |
${datestamp-long} | Returns the date of the Date Stamp component in the long format, e.g., Mon, 14 Sep 2015 7:00 PM. |
${prependText} | Returns content from the Prepend Text field |
${appendText} | Returns content from the Append Text field |