You are here

templates

The templates object contains root-scope objects that are available during the rendition of a template.

sitedata

Always available.

context

Always available.

instance

Always available.

user

Always available ('guest' if unauthenticated).

content

Available if content is being dispatched.

page

The page model object.

theme

The current theme ID.

htmlid

The HTML ID.

url

The URL information object.

head

The string of all component headers (<script> and <link> dependencies).

Custom properties of the Template object can be accessed by using the properties map. Given a custom property called mycustomproperty, it would be accessed like this:

${context.template.properties["mycustomproperty"]}

Custom properties of the Page object can be accessed like this:

${context.page.properties["mycustomproperty"]}

The following Surf directives are available to FreeMarker Templates:

<@region id="regionName" scope="(global, template or page)" protected=true/false/>
<@component componentId="(id of component)" chrome="(id of chrome)" chromeless=true/false/>

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.