Knowledgebase

Article number: 301408

Historic Breadcrumb using XML Data Island

This article explains how to create a breadcrumb navigation panel showing the last x pages a user has visited.


Notes. this article assumes a general knowledge of XML and XSLT. If you are not yet familiar with these then we suggest reading an XML tutorial and an XSLT tutorial.


Method

As well as allowing you to specify an XML source page as a function / content type for a page (under add/edit pages), Sitekit CMS also allows a block of XML to be placed and styled within any part of a page, including a content type or layout template.

In order to add an XML Data Island (a block of data from an external source), the following code should be copied, modified accordingly and pasted wherever the external content should appear.

<xmlconsumer>
<xmlsource url="http://admin.sitekit.net/admin/ws/SessionHistory.asmx/getSessionHistory?NrOfPageHistory=10"></xmlsource>
<xslsource url="http://clients.gael.net/xml/test/histBread.xsl"></xslsource>
</xmlconsumer>

The URI in pink should be replaced with an XML source.

The URI in green should be replaced with an XSL source.

The code may be placed within any piece of html or xhtml , for example:

<table border="1">
<tr>
<td>
<xmlconsumer>
<xmlsource url="http://admin.sitekit.net/admin/ws/SessionHistory.asmx/getSessionHistory?NrOfPageHistory=10"></xmlsource>
<xslsource url="http://clients.gael.net/xml/test/histBread.xsl"></xslsource>
</xmlconsumer>
</td>
</tr>
</table>

Sitekit CMS will automatically consume the XML source page, process it in accordance with the XSLT and display it in the page when the page is requested. There is no XML caching and feeds are represented as 'live'.

Notes:

  • The block may appear in the following locations:
    • Within the content of a page
    • Within a Content Type
    • Within a Layout Template
    • Within a Global Variable
    • Within a Domain Dependant Global Variable
  • For security purposes the XSLT must be approved and signed by Sitekit (you can do this via http://www.sitekit.net/xsl-upload.html )
  • Once signed, the XSLT must not change.
  • You can find the xml version of any pages on a Sitekit CMS site by adding ".xml" to the end of the page name.
  • An XML source may come from an RSS feed, or an XML version of a page, or from an external site.
  • If any error occurs, Sitekit CMS will display a helpful error message on the display page. As a developer, this should help you resolve any problem. We advise viewing the page source for full details if an error occurs.

Related questions