When Velocity code is part of any object which is displayed on a Page — including Containers, Templates, Widgets, and other content displayed on the Page — you may access information about the Page itself using the $dotPageContent
object, one of three built-in content objects.
This object represents the Page content object of the Page where the content is displayed, and allows you to access the properties of the Page from within your Velocity code.
The following properties are available by default for all Pages. Some of these properties may not be available if you have intentionally removed them, and additional fields will be available if you have added additional fields to the Page Content Type being accessed.
Property | Velocity Code | Description |
---|---|---|
Title | $dotPageContent.title | Title of the Page. |
Site | $dotPageContent.host | An object representing the Host object of the Site the Page is located on. |
Site Name | $dotPageContent.host.hostname | Name of the Site the Page is located on. |
Folder | $dotPageContent.hostFolder | An object representing the Folder the Page is located in. |
Path | $dotPageContent.hostFolder.path | Path of the Folder the Page is located in. |
Language Id | $dotPageContent.languageId | The Language ID of the version of the Page being displayed. |
Identifier | $dotPageContent.identifier | identifier of the Page. |
iNode | $dotPageContent.inode | iNode of the Page. |
Modification Date | $dotPageContent.modDate | Last Modification Date of the Page properties. |
URL | $dotPageContent.url | Page URL. |
Cache TTL | $dotPageContent.cachettl | TTL (Time To Live) of the Page cache. |
Template ID | $dotPageContent.template | ID of the Template assigned to the Page. |
Show On Menu Flag | $dotPageContent.showOnMenu | Show on Menu field value. |
Sort Order | $dotPageContent.sortOrder | Sort Order field value. |
Friendly Name | $dotPageContent.friendlyName | Friendly Name field value. |
Redirect URL | $dotPageContent.redirecturl | Redirect URL field value (if set). |
HTTPS Required | $dotPageContent.httpsreq | If true, HTTPS is required to access the page. |
SEO Description | $dotPageContent.seodescription | SEO Description field value. |
SEO Keywords | $dotPageContent.seokeywords | SEO Keywords field value. |
Page Metadata | $dotPageContent.pagemetadata | Page Metadata field value. |