Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello
I have xslt for breadcrum as follows in which I am using one property breadcrumbAlias to show text of beadcrumb.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " ">]><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets "> <xsl:output method="xml" omit-xml-declaration="yes"/> <xsl:param name="currentPage"/> <xsl:variable name="minLevel" select="1"/> <xsl:template match="/"> <xsl:if test="$currentPage/@level > $minLevel"> <div id="breadcrumb"> <a href="/"></a> <img src="/images/breadcrumb_arrow.png" width="10" height="9" hspace="5" alt="breadcrumb"/> <xsl:for-each select="$currentPage/ancestor::* [@level > $minLevel and string(umbracoNaviHide) != '1']"> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="./breadcrumbAlias"/> </a> <img src="/images/breadcrumb_arrow.png" width="10" height="9" hspace="5" alt="breadcrumb"/> </xsl:for-each> <b> <xsl:value-of select="./breadcrumbAlias" /> </b> </div> </xsl:if> </xsl:template></xsl:stylesheet>
In this only current node property is not getting displayed. For loop works fine. But last line is not showing the text which should be shown in bold.
You can only use the "." identifier within a foreach loop, as it means "the current node", as you are with:
<ahref="{umbraco.library:NiceUrl(@id)}"> <xsl:value-ofselect="./breadcrumbAlias"/> </a>
When you're outside your foreach loop you'll need to use the $currentPage variable.
So:
</xsl:for-each> <b> <xsl:value-ofselect="$currentPage/breadcrumbAlias"/> </b> </div>
thx.. actually already tried this but I dont knw why it was not working...
now it works...
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
not showing property value
Hello
I have xslt for breadcrum as follows in which I am using one property breadcrumbAlias to show text of beadcrumb.
In this only current node property is not getting displayed. For loop works fine. But last line is not showing the text which should be shown in bold.
You can only use the "." identifier within a foreach loop, as it means "the current node", as you are with:
When you're outside your foreach loop you'll need to use the $currentPage variable.
So:
thx.. actually already tried this but I dont knw why it was not working...
now it works...
is working on a reply...