I have a new website and use the navigation-xslt of the runway package. Now I want to integrate my root node ("Home") into this nagivation.
So I manually put my "Home"-Site into this xslt. Now I want to check, if this root node is actually selected and then add a new style via <xsl:attribute>.
How can I check in the xslt if the current site is the rood node or "Home"-Site ?
<!-- if the current page is the root node (as in homepage) - use the current node --> <xsl:when test="$currentPage/@level = 1"> <xsl:copy-of select="$currentPage" /> </xsl:when>
thanks for your post, but it doesn't really solved my problem.
Here is my code:
<li> <a href="/"> <!-- Here i want to check if the current site the root node --> <!-- and if yes add the following xsl-attribute --> <xsl:attribute name="style">color:yellow;</xsl:attribute> Willkommen </a> </li>
If want to check, if the current site is the root-site and if yes, add a xsl-attribute.
Base of my navigation is the runwaytopnavigation.xslt from the runway package.
Extending Navigation with Root Node
Hello,
I have a new website and use the navigation-xslt of the runway package. Now I want to integrate my root node ("Home") into this nagivation.
So I manually put my "Home"-Site into this xslt. Now I want to check, if this root node is actually selected and then add a new style via <xsl:attribute>.
How can I check in the xslt if the current site is the rood node or "Home"-Site ?
Thanks,
Thorsten
Thorsten
You could check as the below:
Hope that helps.
Chris.
Hi Chris,
thanks for your post, but it doesn't really solved my problem.
Here is my code:
<li>
<a href="/">
<!-- Here i want to check if the current site the root node -->
<!-- and if yes add the following xsl-attribute -->
<xsl:attribute name="style">color:yellow;</xsl:attribute>
Willkommen
</a>
</li>
If want to check, if the current site is the root-site and if yes, add a xsl-attribute.
Base of my navigation is the runwaytopnavigation.xslt from the runway package.
Thanks,
Thorsten
Thorsten
Try this:
Thanks
Chris.
That was my solution !
Thank You Chris,
Thorsten
Thorsten, no problem. Happy Umbracoing.
Chris.
is working on a reply...