Sitekit: syntax
This page summarises all instances of the Sitekit Namespace specific markup that uses the '<sitekit:attribute />' syntax. All of the following elements are listed elsewhere but this page brings them together in a single summarised list. The list includes:
- sitekit:zone - Zone editing, introduced in 11.0, full zone details here
- sitekit:navigation - Type 6 Navigation, full details here
- sitekit:if - Conditional syntax, full page here
- sitekit:redirect - in page redirection
- sitekit:docfinder - recursive downloads library
- sitekit:info - page information
- sitekit:search - Search form
- sitekit:searchresults - Search results
- sitekit:downloads - Download files (Added in v12. Replaces <COMMENT>DOWNLOAD</COMMENT>).
Sitekit editable zones
<sitekit:zone id="zone-name"/>
|
Place marker for an editable zone on page titled 'zone-name'. This can be added to page or content layouts to replace body fields and images fields below. Allows multiple editable text, image, form, variable block and data islands to be dragged into it on the editing screen. Other option include attributes like hidden, class and title, the latter two only accessed in admin See zone editing. Added in 11.0 |
Sitekit type 6 Navigation
Sitekit 9.2 introduced a new method of navigation, referred to as Type 6 Navigation. The syntax is entirely different from the earlier 1-5 navigation types.
Syntax
<sitekit:navigation id="myNav" class="myCSSClass" />
or
<sitekit:navigation id="myNav" class="myCSSClass"></sitekit:navigation>
Attributes
Nine attributes can be specified, as listed below.
Attribute Name |
Type |
Default Value |
Description |
|
True/False |
True |
If "true", siblings of ancestors to the current page are included in the navigation. |
|
True/False |
True |
If "true", siblings of the current page are included in the navigation. |
|
Integer |
1 |
If "0" then no children of the current page are shown. … etc. |
|
Integer |
100 |
If "0" then no ancestors are shown. .… and so on, up to 100 levels. |
|
True/False |
False |
10.2 and above - If "true", page summaries will be included in the navigation. If the page has no summary then the auto-summary will be used instead. |
|
True/False |
True |
If "true", then the user's profile is shown, if he or she is logged in. |
|
True/False |
True |
If "true" then a logout link is included in the navigation, if the user is logged in. |
|
Single Character |
(off) |
If no value is specified, then access keys are turned off. If you enter "H", for example, then access keys are turned on, starting with the letter H. |
|
Integer |
0 |
Specifies the absolute level at which the Navigation will start. No pages above this level will be included in Navigation. Note that Level 0 is the root. |
|
Integer |
100 |
Specifies the absolute level at which the Navigation will end. No pages below this level will be included in Navigation. Note that Level 0 is the root. |
|
Integer |
|
Specifies the shortcutID specifying the level of the nav to start on. Useful for megamenus (Added in v9.6.4) |
|
Variable Block Name |
|
Specifies the name of a variable block that contains a HTML template defining the markup to be used for each navigation item. See Reserved Variable Blocks. |
|
Variable Block Name |
|
Specifies the name of a variable block that contains a HTML template defining the markup to be used for each list of navigation items. See Reserved Variable Blocks. |
Sitekit conditional if
<sitekit:if op1="operand-value" operator="operator-value" op2="operand-value">
...any HTML markup or sitekit placeholders go here...
</sitekit:if>
Operand-values can be any of the sitekit magic words, any text string or a http request (see below).
Operator-values can be:
=
or==
(equals);!=
or!==
or<>
(not equal);in
(op2 contains op1);not in
(op2 does not contain op1); oroverlaps
(see example 4, op1 is a subset or full set of op2)
If statements can be nested from V12.
Sitekit server side redirect
If you wish a page to redirect to another you can use a server redirect by adding;
<sitekit:redirect url="http://the.url.to/redirect.to" type="301" />
… to a page layout, or a variable block, or within a BODY block.
This defaults to a 302 unless the optional type declaration says 301. Only 301 and 302 are supported. This can be nested within Sitekit 'if' statements to provide logic, and the redirect will not be followed when the if statement returns false.
Because of the page parse order the redirection can also be embedded in XSL (where it needs to be encoded) to capture or deal with null results for example;
XSL extract
<xsl:template match="Holiday">
<xsl:choose>
<xsl:when test="Visible='false' or Visible=''">
<xsl:text disable-output-escaping="yes"><sitekit:redirect url="/holiday-not-found.htm"/></xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:if test=" HolidayTestimonial!=''">
<div id="customer-letters" class="content-box-outer">…</div>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
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.
Sitekit page information
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>
Indexed Search Widget Syntax
Once created, an Indexed Search is deployed as a search form UI on a web page. It requires two elements. the search widget and the results widget
The search widget can be added to a Page Layout, Content Layout, or a Variable Block.
This bit outputs the form to use
<sitekit:search id="Search1" class="Search" action="/search-results.htm" indexname="Search" labeltooltip="" labeltext=" " textboxtooltip="" textboxtext="" textboxplaceholder="" buttontooltip="" buttontext="" />
Parameter |
What it's used for |
id |
Sets html form element id. |
class |
Sets html form element class. |
action |
Sets html form element action. This is where the form is posted to. |
indexname |
Specifies the search index to be searched. |
labeltooltip |
Sets tooltip of label or in html label title. |
labeltext |
Sets text of label or in html label value. |
textboxtooltip |
Sets tooltip of text or in html input type text title. |
textboxtext |
Sets text of textbox or in html input type text value. |
textboxplaceholder |
Sets the html input type text placeholder. |
buttontooltip |
Sets tooltip of button or in html input type submit title. |
buttontext |
Sets text of button or in html input type submit value. |
buttontype |
Sets the type of the html submit element. Can be 'input' or 'button'. (v12) |
autocorrect |
Controls how auto-correction is handled (v12). Can be:
|
itemtemplate |
Specifies the name of a variable block that contains a HTML template defining the markup to be used for each item. See Reserved Variable Blocks. |
listtemplate |
Specifies the name of a variable block that contains a HTML template defining the markup to be used for the list of items. See Reserved Variable Blocks. |
Indexed Search Result Widget Syntax
Once created, an Indexed Search is deployed as a search form UI on a web page. It requires two elements. the search widget and the results widget
The Result widget can be added to a Page Layout, Content Layout, or a Variable Block.
This bit outputs the list of results
<sitekit:searchresults id="SearchResults1" class="SearchResults" indexname="SiteSearch" />
Parameter |
What it's used for |
id |
Sets html form element id. |
class |
Sets html form element class. |
indexname |
Searches this index with term posted in corresponding search widget with the same index name. |
show (optional) |
Set to a comma-separated list of selections [summary, context, description, keywords, link, all, none] If you select context then the data returned will be taken from the page title, keywords, metadata and content text. If you select summary, the returned data will be taken from the page's metadata description alone. Selecting description, keywords or link will display these specific elements. Option all and none are obvious. |
hlevel (optional) |
Specifies which header level, e.g. <h1>, to use in the output HTML. Must be an integer. (v12) |
partial (optional) |
Specifies what type of matching will be used for search terms (v12). Can be:
|
noresults (optional) |
Specifies the text that will be output when no results are found. (v12) |
itemtemplate |
Specifies the name of a variable block that contains a HTML template defining the markup to be used for each item. See Reserved Variable Blocks. |
listtemplate |
Specifies the name of a variable block that contains a HTML template defining the markup to be used for the list of items. See Reserved Variable Blocks. |
Downloads Widget Syntax
The downloads widget specifies where the downloads block will be placed on the page starting from v12.
The Downloads widget can be added to a Page Layout, Content Layout, or a Variable Block.
<sitekit:downloads/>
Parameter |
What it's used for |
showsummary |
Includes the file summary in the output. |
newwindow |
Causes links to open in a new window. |
itemtemplate |
Specifies the name of a variable block that contains a HTML template defining the markup to be used for each item. See Reserved Variable Blocks. |
listtemplate |
Specifies the name of a variable block that contains a HTML template defining the markup to be used for the list of items. See Reserved Variable Blocks. |