Common Template Variables
Titania Delivery populates each Portal Theme page with variables containing several
useful properties.
Within a Freemarker template, these properties can be accessed with
${propertyName}
. Many properties have fields (and sometimes those fields
have fields themselves). These can be accessed with dot syntax. For example,
${propertyName.fieldName}
.
Common Properties
The following properties are present on every page:
portal
- A complex object containing the properties of the portal itself. See PortalIdentity.
hasSecurity
- A boolean property indicating whether the portal is configured for security.
isAuthenticated
- A boolean property indicating whether the current user has logged in.
user
- A complex object containing the properties of the authenticated user. See PortalUser.
currentUrl
- The absolute URL of the current page, excluding any fragment identifier.
request
- The
HttpServletRequest
object for the current request. RequestParameters
- A hash of the URL parameters passed to the request.
userData
- A UserDataStorage object that can be used to store and retrieve persistent data for the current user or session.
siteData
- A SiteDataStorage object that can be used to store and retrieve global data shared by all users.
buildString
- A string containing Titania Delivery versioning information.
online
andoffline
- Boolean variables indicating whether the script is executing in an 'online' (normal) mode or as part of an offline packager. These variables can be used to easily conditionalize modules that contain logic for both online and offline page generation. See Offline Packagers for details.
t
- The namespace for the layout template directives.
Commenting-Related Properties
The following properties are also present on every page, but pertain specifically to commenting-related features.
cmScriptLocation
- A string specifying the URL of the Titania Annotator Javascript library.
moderators
- An array of the ids of the users configured as comment moderators.