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
hi everyone,
i'm completely new to Umbraco, and as a designer i'm having a very hard time to understand XSLT and how it works. Anyway i need to create a breadcrumb which shows:
Home > About Us > Who we are
Till now i have managed to do the following:
<xsl:output method="xml" omit-xml-declaration="yes"/> <xsl:param name="currentPage"/> <xsl:variable name="minLevel" select="1"/> <xsl:variable name="maxLevel" select="3"/> <xsl:template match="/"> <xsl:if test="$currentPage/@level > $minLevel"> <ul class="breadcrumb"> <xsl:for-each select="$currentPage/ancestor::* [@level > $minLevel and @level <= $maxLevel and string(umbracoNaviHide) != '1']"> <li class="smlPathBx1"> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </a> </li> <li class="smlPathBx2"></li> </xsl:for-each> <li class="smlPathBx3"> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </a> </li> <li class="smlPathBx4"></li> <li class="smlPathBx5"> <xsl:value-of select="$currentPage/@nodeName"/> </li> <li class="smlPathBx6"></li> </ul> </xsl:if> </xsl:template></xsl:stylesheet>
but i'm getting an "Error parsing XSLT file: \xslt\breadcrumb.xslt"
can anyone help me on this please? :(
Hi ManU,
If you create a new xslt in Umbraco its possible to select a XSLT template. It includes a default breadcrub script.
<?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" xmlns:uQR="urn:uQR" xmlns:twitpic="urn:twitpic" xmlns:flickr="urn:flickr" xmlns:youtube="urn:youtube" xmlns:UCommentLibrary="urn:UCommentLibrary" exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets uQR twitpic flickr youtube UCommentLibrary "> <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"> <ul> <xsl:for-each select="$currentPage/ancestor::* [@level > $minLevel and string(umbracoNaviHide) != '1']"> <li> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </a> </li> </xsl:for-each> <!-- print currentpage --> <li> <xsl:value-of select="$currentPage/@nodeName"/> </li> </ul> </xsl:if> </xsl:template></xsl:stylesheet>
Hi Bas,
dats what i used... but modified it a bit ...i'll try to do it again though
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
breadcrumb
hi everyone,
i'm completely new to Umbraco, and as a designer i'm having a very hard time to understand XSLT and how it works. Anyway i need to create a breadcrumb which shows:
Home > About Us > Who we are
Till now i have managed to do the following:
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:variable name="minLevel" select="1"/>
<xsl:variable name="maxLevel" select="3"/>
<xsl:template match="/">
<xsl:if test="$currentPage/@level > $minLevel">
<ul class="breadcrumb">
<xsl:for-each select="$currentPage/ancestor::* [@level > $minLevel and @level <= $maxLevel and string(umbracoNaviHide) != '1']">
<li class="smlPathBx1">
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName"/>
</a>
</li>
<li class="smlPathBx2"></li>
</xsl:for-each>
<li class="smlPathBx3">
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName"/>
</a>
</li>
<li class="smlPathBx4"></li>
<li class="smlPathBx5">
<xsl:value-of select="$currentPage/@nodeName"/>
</li>
<li class="smlPathBx6"></li>
</ul>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
but i'm getting an "Error parsing XSLT file: \xslt\breadcrumb.xslt"
can anyone help me on this please? :(
Hi ManU,
If you create a new xslt in Umbraco its possible to select a XSLT template. It includes a default breadcrub script.
Hi Bas,
dats what i used... but modified it a bit ...i'll try to do it again though
is working on a reply...