Available Data

Access Project Properties

Various properties from the current environment can be used within templates but access must be granted through the setProps command in the hooks.js file first.

const transformHook = (rw) => {    
    // Make sure we have access to properties within the template
    rw.setProps({
        project: rw.project,
        page: rw.page,
        node: rw.node,
        element: rw.element
    })
}

exports.transformHook = transformHook;

With this in place, we gain access to the following within template files.

Project Properties

Property NameTypeDescription

{{project.siteURL}}

String

{{project.mode}}

String

{{project.title}}

String

{{project.slogan}}

String

{{project.copyright}}

String

{{project.email}}

String

{{project.contactText}}

String

{{project.enableSocialTags}}

Boolean

{{project.language}}

String

{{project.logo.url}}

String

{{project.logo.alt}}

String

Page Properties

Property NameTypeDescription

{{page.title}}

String

{{page.description}}

String

{{page.id}}

String

{{page.language}}

String

{{page.filename}}

String

{{page.ext}}

String

{{page.absolutePath}}

String

{{page.docRootPath}}

String

{{page.resourcesPath}}

String

Node Properties

Property NameTypeDescription

{{node.id}}

String

{{node.parent.id}}

String

{{node.parent.container}}

String

{{node.title}}

String

Element Properties

Property NameTypeDescription

{{element.group}}

String

{{element.title}}

String

{{element.version}}

String

{{element.assetPath}}

String

{{element.siteAssetPath}}

String

Last updated

We are Realmac Software. We make nice things.