This help page is kept for historical reference but more up to date information is available on the syntax guide.
Sitekit CMS System Variables (sometimes previously referred to as Magic Words) are used in many places throughout the CMS: in Page Layouts, Content Layouts, BODY blocks, Global Variables, News/Events, and Forms. They provide auto-generated information related to the page or resource being accessed.
The syntax of reserved magic words uses a triple-colon style
:::word::: and some variables may be separated by a period, i.e. thispage.info.picurl1. New magic words are added frequently and usually updated with each release of Sitekit CMS.
System Variables make it possible to automatically insert dynamic information on a page. A System Variable can be used in a Template, in a Global Variable, or in Page Content. The system variables are replaced with the relevant HTML by the server.
It is difficult to over-emphasize the usefulness of this feature. Some reserved magic words are used almost ubiquitously, such as
:::printthispage::: to link to the print-version of a page, or
:::textonly::: to link to the high-contrast text-only version. One common option is to put <h1>System Variables</h1> at the top of the CONTENT block of a page, thereby automatically generating the main page header from the page’s title in Page Properties instead of it needing to be entered manually.
Some magic words are particularly useful in XML data islands to provide variables to XML web services.
:::uri::: provides the URL of the current page,
:::domain::: provides the domain only, and
:::provides the Shortcut ID. A recently added magic word that can also be useful in XML data islands is the metadata variable. This can pull the value for a given metadata field chosen in Page Properties, and then used to drive an XML web service, for instance. One example might be to display all other pages that match the category of the current page – in this case you might use a reserved magic word such as
All System Variables should be called using a triple colon. For example, if you wanted to use the variable 'date' , you would call it by using;
The number of System Variables tends to grow over time. For example, four more were introduced in Sitekit v9.4 and another three in v9.5. So if you haven't seen them before, or just not checked them lately, it's worth while downloading the latest System Variable Syntax datasheet,
The latest version of the System Variables can be found in the online syntax guide under the related links section.