Syntax Guide

Article number: 300864
Last updated: 24 January 2017

General facilities

These are general elmenets related to CMS content

Downloads

Allows XML in Sitekit to output a folder(s) of some or all downloads in HTML. Example is below

<downloads folder="/white-papers,/case-studies" OverrideHeaderAndFooter="true" OverrideFooter="Please select a download from above" ShowGetPDFReaderLink="false"></downloads>

Paths to folders must be correct. Syntax should not be used in conjunction with the basic <COMMENT>DOWNLOAD</COMMENT> on the same page. The downloads element are only ever ordered by assetlist.name, so to get them in the correct order the assetlist folder needs a naming convention that orders it.

Recursive downloads library

Displays a navigable document library in page allowing navigation down through nested folders. Simplest example is below

<sitekit:docfinder url="/downloads" />

Configuration options are available below. The specific script required are handled by the script manager (10.2)

<sitekit:docfinder id="docfinder1" css="/css/mystyles.css" filter="downloadfiles" url="/downloads/" onassetclick="clickhandler"/>

Options:

  • id - [optional] id for the doc-finder container div.
  • css - [optional] allows a specific stylesheet to be used for doc-finder styles.
  • filter - [optional] can take the following options : 'downloadfiles', 'images', 'editorialpages', 'none'.
  • url - [optional] the url of the root folder for the doc finder assets
  • onassetclick – optional customisable click handler This allows full control over the content of the summary panel or allows the summary panel to be removed entirely.

Regarding the last argument onassetclick – Callback – function (event, asset, $summary) Specify either the name of a javascript function to call or supply an anonymous javascript function to be called when an asset in the doc-finder is clicked.

Eg

<script type="text/javascript"> var docFinderClickHandler = function (event, asset, $summary) { var html; if (asset.AssetType == 'image') { html = '<p class="SKDocFinderAssetTitle">' + asset.Title + '</p>' + '<img src="' + asset.url + '"/>' + '<p class="SKDocFinderAssetName">' + asset.Name + ' (' + asset.Size + ' bytes)</p>'; } else if (asset.AssetType == 'file') { html = '<p class="SKDocFinderAssetTitle">' + asset.Title + '</p>' + '<p class="SKDocFinderAssetName">' + asset.Name + ' (' + asset.Size + ' bytes)</p>'; } else { html = '; } html += '<div class="SKDocFinderAssetSummary">' + asset.Summary + '</div>' + '<a href="' + escape(asset.url) + '" class="SKDocFinderDownloadButton" target="_blank" title="' + asset.AssetType + '">Download</a>'; $summary.html(html); } </script> <sitekit:docfinder id="df1" onassetclick="docFinderClickHandler"/>

Data islands

The following is used to replace the marker with the relevant XML and XSL transformed data island (10.4)

Main Syntax element

What it's for

:::dataisland-dataislandName:::

replaces the relevant marker with the contents of the name data islands as configured here.

Global Variables

The following are used to replace whatever language, branch dependent or domain dependent variable block or variable that has been set in the styling section of the Sitekit CMS admin;

Main Syntax element

What it's for

<variableblock>variableName</variableblock> or :::variableBlock-variableName::: or :::block-variableName:::(added in 11.0)

Variable HTML Blocks.

:::variableBlock-variableName(argA,argB):::

Variable HTML Blocks with passed in argument. In the HTML block the place markers $0 and $1 would be replaced with the passed in arguments. Up to 10 args can be passed in (new in 10.4)

<variable>variableName</variable> or :::variable-variableName:::

Simple Variables.

System global variables (reserved global variables)

The following global variables do not need to be placed explicitly in content or layouts as their content will automatically be placed in the correct location on any rendered page that's has relevant content. The blocks in question just need added to the variable block section under the build menu in admin with the naming below. Generally they come in place already on new sites but with empty content

Reserved variable block name

Where it goes in the html

HeadSectionMetaHTML

HTML preceding the CSS declaration in the metaheader (Added in v9.6)

HeadSectionHTML

HTML coming after the CSS declaration in the metaheader

Top

Specific case which does need formally located in templates through the use of <COMMENT>TOP</COMMENT>. Typically used for HTML blocks at top of template

Header

Specific case which does need formally located in templates through the use of <COMMENT>HEADER</COMMENT>. Typically used for HTML blocks at top of template

NavHeaderHTML

Text preceding the <COMMENT>NAV</COMMENT> block.  Deprecated in 9.6 for type 6 nav

NavFooterHTML

Text coming after the <COMMENT>NAV</COMMENT> block.  Deprecated in 9.6 for type 6 nav

RefChildHeaderText

Text preceding the <COMMENT>REFERENCE</COMMENT> block. 

RefChildFooterText

Text coming after the <COMMENT>REFERENCE</COMMENT> block. 

DownLoadsHeaderText

Text preceding the <COMMENT>DOWNLOAD</COMMENT> block. 

DownLoadsFooterText

Text coming after the <COMMENT>DOWNLOAD</COMMENT> block. 

ExternalLinksHeaderText

Text preceding the <COMMENT>EXTERNAL</COMMENT> block. 

ExternalLinksFooterText

Text coming after the <COMMENT>EXTERNAL</COMMENT> block. 

RefHeaderText

Text preceding the <COMMENT>INTERNAL</COMMENT> block. 

RefFooterText

Text coming after the <COMMENT>INTERNAL</COMMENT> block. 

Footer

Specific case which does need formally located in templates through the use of <COMMENT>FOOTER</COMMENT>. Typically used for HTML blocks at bottom of template

Generic Site access

Accessing any Sitekit site via its siteid in the URL – Sksite_<siteid>.sitekit.net

Sksite_1636.sitekit.net

Direct editing access

Access to the direct editing interface of the CMS can be made by placing the following in the relevant page layout

:::edit:::   or   :::editalways:::

These are replaced with links into the editing interface. When using :::edit:::, the edit icons only appear when logged in, while the  :::editalways::: option always displays the edit icons.

Related questions


This article was last updated on 24 January 2017. Did you find it helpful?