Syntax Guide

Article number: 300866
Last updated: 07 November 2018

Reserved or Magic Words

All the following are invoked by encasing the relevant word in triple colons eg :::word:::

Magic word

Description

:::date.long:::

IIS web server date.

:::Time:::

IIS web server time.

:::Month:::

IIS web server date month.

:::Day:::

IIS web server day.

:::Monthname.long:::

IIS web server date month name as long format

:::monthname.short:::

IIS web server date month name as short format.

:::Year:::

IIS web server date year.

:::Dayofweek:::

IIS web server date day of week.

:::Dayofweek.nr:::

IIS web server date day of week as hash code.

:::datestring:::

IIS web server date as continuous string eg 20131202 for 2nd December 2013

:::Datetimestring:::

IIS web server time and date as continuous string eg 201312021115

:::timestring:::

IIS web server time as continuous string eg 1115 for 11:15

Page or Asset Information

Magic word

Description

:::length(magic-word):::

The length magic word is used to return the length of a string returned by another magic word. For example, :::length(username)::: would return 10 – assuming the user's name contained 10 characters.

:::textonly:::

URL to the text only version of the page.

:::mobileswitch:::

URL to the mobile/desktop version of the page

:::xmlversion:::

URL to the XML version of the page.

:::printthispage:::

URL to the print version of the page.

:::changelang:::

Inserts necessary code to change language in multilingual pages.

:::lang:::

The pages language identifier of the current site eg ‘FR'

:::lorem###:::

where ### is an integer. Inserts the integer number of character of space filler text in page.

:::Title:::

Page title.

:::editorialtitle:::

Page title.

:::currentpageeditorialtitle:::

Page title.

:::menutitle:::

Page title for menu.

:::menueditorialtitle:::

Page title for menu.

:::promokeyword:::

Page name.

:::requestpromokeyword:::

Page name.

:::lastupdatedby:::

User who last updated page.

:::lastupdated:::

Date and time page last updated.

:::lastupdated.shortdate:::

Date page last updated.

:::lastupdated.longdate:::

Date page last updated.

:::lastupdated.shorttime:::

Time page last updated.

:::lastupdated.longtime:::

Time page last updated.

:::parentpageinfo.<level>.<fielddisplayed>:::

or
:::pageinfo.<shortcutid>.<fielddisplayed>:::

or
:::thispageinfo.<fielddisplayed>:::

or
:::parentpageinfo.asc.<level>.<fielddisplayed>:::

Displays information about the current page. Valid fielddisplayed options are shown below and are used repeatedly for various identifiers.

fielddisplayed

What it does

title

Page Title

navtitle

Navigation Title

absurl

Using RESTful URLs (10.5)

relURL

Using RESTful URLs (10.5)

summary

Page Summary

summaryimagepicid

Returns the picid for the page summary image.

datelastmodified

Date last modified

lastmodifiedby

Person who last modified it

order

Sort order of the items within the navigation structure at that level. Includes pages hidden from navigation.

ordinal

Ordinal value to the above but where order present the sortOrder pulled from the DB the ordinal is always a 1,2,3,4 order of navigation branches with no gaps. Hidden pages are not included but pages in the recycle bin are similar.

bodyX

Where X is the body number. Outputs the contents of a BODY block.

bodylengthX

Where X is the body number. Outputs the number of characters in a BODY block.

picidX

Where X is the pic number. Outputs the Asset Link ID.

picurlX

Where X is the pic number. Outputs the URL (if link) field.

picurltargetX

Where X is the pic number. Outputs the Target for URL field.

picattributesX

Where X is the pic number. Outputs the cropping settings as querystring parameters (e.g. &cropright=5)

shortcutid

displays the shortcutid of the identified page.(10.4)

picpathX

Where X is the pic number. Outputs the path of the image (added in 10.5).

:::pageinfo.<shortcutID>.<fielddisplayed>:::

See above for fielddisplayed options. Displays information about the current page. Valid fields are described in the fielddisplayed table shown above. Note: None of the pageinfo, or parentpageinfo or thispageinfo prefixed syntax will return valid values for virtual pages as these are only 'pointers' to where the real content is.

:::thispageinfo.<fielddisplayed>:::

See above for fielddisplayed options. Displays information about the current page. Valid fields are described in the fielddisplayed table shown above. Note: None of the pageinfo, or parentpageinfo or thispageinfo prefixed syntax will return valid values for virtual pages as these are only 'pointers' to where the real content is

Parent or ancestor IDs

:::parentpageinfo.asc.<level>.<fielddisplayed>:::

This is an addition for thispageinfo, parentpageinfo, pageinfo magic words. Like bodyX, could be ancestorX (ancestor1 = parent, ancestor2 = grandparent), e.g. parentpageinfo.asc.1.navtitle would show the current pages, parent page nav title. See above for fielddisplayed options.

:::parentpageinfo.<level>.<fielddisplayed>:::

See above for fielddisplayed options. Displays information about the current page. Valid fields are described in the fielddisplayed table shown above. Note: None of the pageinfo, or parentpageinfo or thispageinfo prefixed syntax will return valid values for virtual pages as these are only 'pointers' to where the real content is.

:::assetfullpath.shortcutid-<shortcutID>:::

Displays the full path of the asset with the specified shortcutid. See example at bottom of table.

:::showfrom:::

Page show from date.

:::showfrom.shortdate:::

Page show from date.

:::showfrom.longdate:::

Page show from date.

:::showto:::

Page show from date.

:::showto.shortdate:::

Page show from date.

:::showto.longdate:::

Page show from date.

:::editorialid:::

Editorial ID of page.

:::shortcutid:::

Shortcut ID of page.

:::assetid:::

Asset ID of page.

:::pagepath:::

Concatenated string representing the path from the current page name to the root using the promokeyword. Each pagename is separated by a dot, all ‘.html's are removed, all slashes (/) are replaced by a dot ie home.forums.forum.

:::pagepath_lower:::

Concatenated string representing the path from the current page name to the root using the promokeyword in lower case. Each pagename is separated by a dot, all ‘.html's are removed, all slashes (/) are replace by a dot.

:::Urlpagepath:::

Same string treatment as above except it only produces the page name alone, ie forum.

:::summary:::

Page summary.

:::autosummary:::

Page auto summary.

:::protocol:::

The protocol the page is being served on. eg https

:::pdomain:::

The protocol and domain the page is being served on. eg https://helpcms.sitekit.net

:::domain:::

The domain the page is being served on. eg helpcms.sitekit.net

:::subdomain:::

The sub domain the page is being served on. eg helpcms

:::uri:::

Complete web address of the page

:::category:::

For use on a page displaying a single news article (both types of news work). It displays the category of the relevant article as defined in its RSS. If the word is used on a news page then it displays a comma separated list of the unique categories applied to the displayed news items.

Zone related
:::zone.myzonename.count:::

Where 'myzonename' is the name of a zone on the page. Used to identify whether a page zone contains editable elements and could be taken advantage of using conditionals to remove wrapper markup when zones are empty. Added in 11.0

Embedding forms.
:::form-formname:::
:::form-formID:::

It accepts either the form name or the formID number, n.b. if the form name contains no alphabetic characters then you have to use the formID number. Only works for v2 and v3 forms. Added in 11.1.

Presence of page blocks. :::thispageinfo.hasinternallinks:::
:::thispageinfo.hasexternallinks:::
:::thispageinfo.hasdownloads:::

Used to identify whether a page has the specific blocks and could be taken advantage of using conditionals.

:::metadata.keywords:::

Displays the metadata keywords applied to this page.

:::metadata.description:::

Displays the metadata description applied to this page.

:::metadata.<fieldname>:::

Displays the additional metadata value for the fieldname in question for this page. The fieldname used to call any additional metadata is whatever is inside the <NAME></NAME> tags in the relevant additional metadata scheme.

:::fileinfo.<shortcutID>.<field>:::

Mainly intended for returning information about a .pdf file held in the file library, via the asset's shortcut id.

shortcutID is the integer shortcut id of the asset.

The field options are as follows:

Field

Description

:::name:::

The filename field from the file downloads table

:::created:::

The created date field from the file downloads table.

:::summary:::

The summary field from the file downloads table

:::mimetype:::

The mime type from the file downloads table.

:::modified:::

The date and time on which the file was last modified.

:::displayname:::

The displayname field from the file downloads table.

For example, the following will present a dynamic link using the displayname for the file followed by it summary using only the shortcutid;

<p>
	<a href=":::assetfullpath.shortcutid-450808:::" target="_blank">
		:::fileinfo.450808.displayname:::
	</a>
	:::fileinfo.450808.summary:::
</p>

Note: The asset can only be a file in the file library. It won't work on page assets. It will only get the data for the current ‘active' version of the file, and won't return information if the file is in the bin.

You can use this syntax to render an image in an xsl say from its passed in shortcut id eg

<img alt="{FullName}" src="###assetfullpath.shortcutid-{picshortcutid}###"/>

If bodyX exists on the specified page (specified by editorialid and lang or pageParentlevel) then it is returned (or else a blank string is returned). The presence of text can also be checked by testing whether bodylengthX>0 The attributes and attribute vales are all case sensitive. If the summary field is blank autosummary is used. For example

<sitekit:info pageEditorialid="009001" lang="EN" fielddisplayed="navtitle" />

<a href="<sitekit:info fielddisplayed="absurl" pageParentlevel="1" />">Home page</a>

<a href="<sitekit:info fielddisplayed="absurl" pageParentlevel="2" />">Ians page</a>

System Variable Alternative

Alternatively similar functionality is available using the following system variables where the fieldname argument is taken from the bullet list above.

:::pageinfo.<editorialid>.<lang>.<fielddisplayed>:::

:::pageinfo.<shortcutid>.<lang>.<fielddisplayed>:::

:::parentpageinfo.<level>.<fielddisplayed>:::

:::thispageinfo.<fielddisplayed>:::

User Specific/Extranet Information

Magic word

Description

:::username:::

User's Username.

:::fullname:::

User's full name.

:::telephone:::

User's telephone.

:::fax:::

User's fax.

:::email:::

User's email

:::job:::

User's job title.

:::department:::

User's department.

:::notes:::

User's notes.

:::lastloggedontoextranet:::

User's last logged into extranet date time.

:::usergroupid:::

User's group id.

:::peopleID:::

User's unique identifier.

:::usergroupcsv:::

Returns a comma separated list of all the user Group ID numbers that a user belongs to. For use with ‘overlaps' operator.

:::usergroupnamecsv:::

Comma separated list of the multiple group the logged in user is in so would return "admin,editor,publisher" . For use with ‘overlaps' operator.

:::sessionid:::

User's session.

:::trackerate:::

User's refID from the trackerate cookie.

:::userexpiry:::

User's expiry date.

:::address1:::

User's address1

:::address2:::

User's address2

:::town:::

User's town

:::county:::

User's county

:::country:::

User's country

:::postcode:::

User's postcode

:::avatar:::

returns the url path of the avatar pic

:::dob:::

returns dob in format 01/01/1111

:::dob.pattern

returns dob in any format required using patterns described at:
http://www.geekzilla.co.uk/View00FF7904-B510-468C-A2C8-F859AA20581F.htm eg :::dob:::, :::dob.dd/MM/yyyy:::, :::dob.dd-MM-yyyy::: or :::dob.dddd, dd MMMM yyyy:::

User Personalisation Information

The same applies for user groups using the custom user group system variables below.

Magic word

Description

:::user_custom1:::

User custom 1.

:::user_custom2:::

User custom 2.

:::user_custom3:::

User custom 3.

:::user_custom4:::

User custom 4.

:::user_custom5:::

User custom 5.

:::user_custom6:::

User custom 6.

:::group_custom1:::

Group custom 1.

:::group_custom2:::

Group Custom 2.

:::group_custom3:::

Group Custom 3.

:::group_custom4:::

Group Custom 4.

:::group_custom5:::

Group Custom 5.

:::group_custom6:::

Group Custom 6.

Conditional System Variables

It is possible to insert the values into a sentence. However, if the user logged in does not have information in one of the fields that data is being called from, or they are just not logged in then it is best if the sentence does not display (as the system variable would not display). Use the following code to check that there is information in the user field in question and if the information is missing then the sentence will not be displayed.

<customtext required="fullname,user_custom1">Welcome . Your star sign is </customtext>

Put the required fields in the ‘required' attribute of the customtext tag, separating them with commas (no spaces). Then if the user does not have an entry in the ‘fullname' field then the sentence will not be displayed.

Site Information

Magic word

Description

:::sitename:::

Site name. (10.5)

:::sitelastupdated:::

Site last updated date time.

:::sitelastupdated.shortdate:::

Site last updated short date.

:::sitelastupdated.longdate:::

Site last updated long date.

:::sitelastupdated.shorttime:::

Site last updated short time.

:::sitelastupdated.longtime:::

Site last updated long time.

:::googleanalyticsid:::

This is the Google site id as entered in Site settings, it's embedded automatically in the google-analytics js block in script manager (introduced in 10.2).

Client Environment Information

Magic word

Description

:::clientos:::

The clients operating system as derived from the browser request object.

:::clientbrowser:::

The clients operating system as derived from the browser request object.

:::clientip:::

The clients IP as derived from the Server variables object.

:::countryfromip:::

The country of origin of the page request based on the request IP address.

:::countrycodefromip:::

The country of origin of the page request based on the request IP address.

:::webcrawler:::

A Boolean representing whether the browser is a crawler as derived from the Server variables object.

:::User_agent:::

The entire user_agent string being used by the client, see example on conditionals, used for browser sniffing.

:::referrerurl:::

The URL where the link was clicked to come here derived from the Server variables object.

:::servervariables.xxx:::

Where xxx is the relevant server variables name e.g :::servervariables.SERVER_PORT ::: Added in 10.3

:::formparameters:::

Any name variable pairs being passed as a post.

:::formparameters.<parameter name>:::

Return value from element specified in [parameter name] posted form. Equivalent to Request.form.item([parameter name]).

:::querystringparam:::

Any name variable pairs being passed in the URL as a get.

:::querystringparam.<parameter name>:::

Return value from element specified in [parameter name] get form. Equivalent to Request.querystring.item([parameter name]).

:::cookie.cookieName:::

Displays the relevant cookie value when extracted by its name.

System Information

Magic word

Description

:::sitekitversion:::

Sitekit CMS version used to serve webpage from web.config file.

:::iistimestamp:::

IIS web server full time when webpage was served.

:::iisversion:::

IIS web server version that served the webpage.

:::serverip:::

IIS web server IP address that served the webpage.

:::servermachinename:::

IIS web server name that served the webpage.

:::dotnetversion:::

IIS web server version of Microsoft .Net that served the webpage.

:::responsetime:::

IIS web server time took to generate webpage in milliseconds.

:::responsetimesec:::

SQL Server live server response time in seconds.

:::sqlresponsetime:::

SQL server live server response time in milliseconds.

:::sqlresponsetimesec:::

SQL server live server response time in seconds.

:::sqltimestamparchive:::

SQL Server archive server time stamp when data was served.

:::sqltimestamplive:::

SQL Server live server time stamp when data was served.

:::sqlversion:::

SQL Server live server version.

:::sqlversionarchive:::

SQL Server archive server version.

Forum email formatting

The following are related to formatting of email responses in forums in 10.2

Magic word

Description

:::site.name:::

Site name

:::discussion.name:::

Forum discussion name

:::discussion.body:::

Forum initial post body text

:::discussion.owner.fullname:::

Discussion owners full name

:::discussion.owner.email:::

Discussion owners email

:::comment.owner.fullname:::

Forum commenters full name

:::comment.owner.email:::

Forum commenters email

:::comment.body:::

Body text of the comment

:::posttype.name.singular:::

Posttype singular

:::posttype.name.plural:::

Posttype plural


User store

The following relate to values set and retrieved from the user store , populating and retrieving values is done via the SecureUserStore.asmx web service documented here.

Magic word

Description

:::secureuserstore-xxx:::

Retrieval of any item placed in the user store where 'xxx' is the name given to the value

Relating to Federated logins

The following are related to federated authentication

Magic word

Description

:::federated-login:::

the federated login start point. (10.2)

:::federated-logout:::

the federated login end point. (10.2)


Relating to autologins

The following are related to registration and auto-login but they can be used in other contexts

Magic word

Description

:::errormessage:::

returns the error message from the resulting login attempt. (10.2)

:::loggedin:::

returns a true or false whether the current user is logged in. (10.2)


'Magic' get

Magic word

Description

::[get-http://:::domain::::::assetfullpath.shortcutid-761164:::]::

rather than returning a textual link to the asset this will return the asset itself.


Encoding Magic word (triple colon) syntax for front end display

This is for adding magic words in front end forums or help pages like this, when you want to display the syntax rather than have the page interpret the syntax. (10.2)

Magic word

Description/effect

<code>:::domain:::</code>

Displays the triple colon notation itself rather than interpreting it, eg :::domain:::

:::magic-<any magic word syntax>:::

Displays the triple colon notation itself rather than interpreting it, eg :::<any magic word syntax>:::



'Magic' comments

This is for adding commentary via HTML comment to the markup, all such comment are stripped out for presentation but can be read via debug. (10.4)

Magic word

Description/effect

<--- text inside comment --->

All content inside the comment <--- ---> is removed from front end visible pages unless the skdebug flag is used


Functional Magic words

These magic words do not return anything, instead they instruct the system to do something.

Magic word

Description/effect

:::include-<group name>:::

Adds the specified group of items from the script manager. (10.2)

:::themeid:::

Needed only for the script manager link that returns the id of the stylesheet that is assigned to the page in page properties (10.4)

Related questions


This article was last updated on 07 November 2018. Did you find it helpful?