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
I have a breadcrumb where I need it to be styled differently if the breadcrumb trail is on two nodes than if there is 3,4,5 etc...is this possible? If so could someone please help?
Thanks
Hi Andrew,
You can do something like this (setting a class on the <ul> if there is less than 3 nodes in the breadcrumb):
<xsl:template match="/"> <xsl:variable name="trail" select="$currentPage/ancestor-or-self::*[@isDoc]" /> <ul> <xsl:if test="count($trail) < 3"> <xsl:attribute name="class">special</xsl:attribute> </xsl:if> <xsl:apply-templates select="$trail" /> </ul> </xsl:template> <!-- Template for individual nodes in the nav --> <xsl:template match="*[@isDoc]"> <li> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName" /> </a> </li> </xsl:template>
/Chriztian
Thanks Chriztian i'll give it a go
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
breadcrumb
I have a breadcrumb where I need it to be styled differently if the breadcrumb trail is on two nodes than if there is 3,4,5 etc...is this possible? If so could someone please help?
Thanks
Hi Andrew,
You can do something like this (setting a class on the <ul> if there is less than 3 nodes in the breadcrumb):
/Chriztian
Thanks Chriztian i'll give it a go
is working on a reply...