Page Variables
Templates, Widgets and HTML Content (with allow GSP enabled) have access to a data model that includes several variables that are used to render information about the current page, user or space.
Variable: page
This object presents information about the current page of the web site. The page is constructed from a template and content, and is located using a unique URI, so this is not to be confused with the "active" content node.
Properties
-
URI - The uri of this page relative to the current space
-
parentURI - The uri of this page's content node's parent
-
lineage - The list of ancestor nodes, in top-down order
-
title - The page title
-
titleForHTML - The page title for HTML title tag, including for example SEO keywords
-
titleForMenu - The page title for rendering menus, usually a shorter version of the title
Variable: user
This object presents information about the current user.
Properties:
-
username - The user's login name
-
firstName - The user's first name
-
lastName - The user's last name
-
email - The user's email address
Variable: node
This object provides access to information about the primary content node of this page. The properties available will vary based on the content type.
Properties:
-
title - The content title
-
content - The content text
-
aliasURI - The primary URI for this content node
-
language - The language of this content, a Language object
-
createdBy - The username of the user that created the content
-
createdOn - The date the content was originally created
-
changedBy - The username of the last user to edit the content
-
changedOn - The date on which the content was last edited
-
space - The space (object) to which this content node belongs