Syntax Guide

Article number: 300865
Last updated: 28 February 2022

XSL placeholders

The following syntax is used within an XSL transformation in a data island.

HeaderOverride

By embedding this content and putting XSL field elements within the tags the standard tags within the HTML <HEAD> are over written. This allows the developer to create a database driven page with differing title and header attributes depending on the content of the page.

In 10.5 support for a generic header override syntax was added to the CMS which can be embedded anywhere to add extra head tags that the CMS does not automatically provide.

Syntax: (10.2 canonical added)

 <headoverride>

   <title></title>

   <keywords></keywords>

   <description></description>

   <canonical></canonical>

</headoverride>

Example:
The example embeds content from the XSL. It can be placed anywhere in the body of the XSL though it's usually easier to use it at the top

<headoverride>

<title><xsl:value-of select="BusinessName"/>, <xsl:value-of select="town" /> | Hostel <xsl:value-of select="region" />

Scotland | <xsl:value-of select="town" /> Hostel Accommodation</title>

<description>A warm welcome awaits you at <xsl:value-of select="BusinessName" /> in <xsl:value-of select="town" />,

<xsl:value-of select="region" />, a quality assured, independent hostel offering excellent budget accommodation.</description>

<keywords><xsl:value-of select="BusinessName"/>, Independent Hostel <xsl:value-of select="town" />,

<xsl:value-of select="town" /> Hostel Accommodation, <xsl:value-of select="town" /> Youth Hostel</keywords>

<canonical>http://:::domain:::<xsl:value-of select="RESTURL"/></canonical>

</headoverride>

Resulting HTML output

<head>

<title>sleeperzzz.com, Rogart | Hostel Sutherland Scotland | Rogart Hostel Accommodation</title>

<meta name="description" content="A warm welcome awaits you at sleeperzz.com in Rogart, Sutherland a quality assured,

independent hostel offering excellent budget accommodation." />

<meta name="keywords" content="sleeperzzz.com, Independent Hostel Rogart, Rogart hostel accommodation, Rogart youth hostel" />

<link rel="canonical" href="http://www.example.com/hostel/sleeperzzz.com" />

<meta name="Author" content="pmacleod" />

<meta name="LastUpdated" content="08/06/2011 13:35" />

</head>

Related questions


This article was last updated on 28 February 2022. Did you find it helpful?