Jump to content

Disable the current link in a breadcrumb trail


jelly46

Recommended Posts

Does anyone know how to disable the current link in a breadcrumb trail. I am working on a bspoke CMS and i have been asked to remove the current link in the breadcrumb trail. All that i know in XSLT has failed and i have quite some time on, XSLT is no my strength and i need some helpful input. Please help here is the XSLT code:

	<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">	<xsl:output method="html" omit-xml-declaration="yes" /> 	<!--	Variable to determine if the current open page is displayed as a link or plain text	select = 1 - displays plain text link	select = 0 - displays link (default value)	  -->	<xsl:variable name="DisableCurrentPageLink" select="0" /> 	<xsl:template match="BreadCrumbTrail">	<xsl:apply-templates select="Page" />	</xsl:template> 	<xsl:template match="Page">	<span class="BCTDelimiter">»</span>	<xsl:choose>	<xsl:when test="$DisableCurrentPageLink = 1">	<xsl:choose>	<xsl:when test="@IsOpenPage = 1">	<span class="breadcrumb-link">	<xsl:value-of select="@Title"/>	</span>	</xsl:when>	<xsl:otherwise>	<a href="{@URL}" class="breadcrumb-link" title="{@Title}">	<xsl:value-of select="@Title" />	</a>	</xsl:otherwise>	</xsl:choose>	</xsl:when>	<xsl:otherwise>	<a href="{@URL}" class="breadcrumb-link" title="{@Title}">	<xsl:value-of select="@Title" />	</a>	</xsl:otherwise>	</xsl:choose>	</xsl:template>	</xsl:stylesheet>  

Link to comment
Share on other sites

Everything with this code seems fine at first sight... could you give a sample XML that would be given to this XSLT? Maybe it's an XPath issue (i.e. you're not targeting the nodes you think you're targeting).

Link to comment
Share on other sites

Again - some sample XML please... to help you, I'll need to debug this extensively. Even if indeed that's not the issue, the XML is part of the puzzle non the less.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...