Page Content in Velocity

Last Updated: Jun 17, 2024
documentation for the dotCMS Content Management System

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.

PropertyVelocity CodeDescription
Title$dotPageContent.titleTitle of the Page.
Site$dotPageContent.hostAn object representing the Host object of the Site the Page is located on.
Site Name$dotPageContent.host.hostnameName of the Site the Page is located on.
Folder$dotPageContent.hostFolderAn object representing the Folder the Page is located in.
Path$dotPageContent.hostFolder.pathPath of the Folder the Page is located in.
Language Id$dotPageContent.languageIdThe Language ID of the version of the Page being displayed.
Identifier$dotPageContent.identifieridentifier of the Page.
iNode$dotPageContent.inodeiNode of the Page.
Modification Date$dotPageContent.modDateLast Modification Date of the Page properties.
URL$dotPageContent.urlPage URL.
Cache TTL$dotPageContent.cachettlTTL (Time To Live) of the Page cache.
Template ID$dotPageContent.templateID of the Template assigned to the Page.
Show On Menu Flag$dotPageContent.showOnMenuShow on Menu field value.
Sort Order$dotPageContent.sortOrderSort Order field value.
Friendly Name$dotPageContent.friendlyNameFriendly Name field value.
Redirect URL$dotPageContent.redirecturlRedirect URL field value (if set).
HTTPS Required$dotPageContent.httpsreqIf true, HTTPS is required to access the page.
SEO Description$dotPageContent.seodescriptionSEO Description field value.
SEO Keywords$dotPageContent.seokeywordsSEO Keywords field value.
Page Metadata$dotPageContent.pagemetadataPage Metadata field value.

On this page

×

We Dig Feedback

Selected excerpt:

×