Using the ParentPageLink.xlst

Apr 30, 2009 at 12:33 PM

I've added the ParentPageLink Macro to most pages so the user can easily go back to parent page. However I want to hide it if the parent page is the rootpage... How do I add that filter in ParentPageLink.xslt...?
Apr 30, 2009 at 12:35 PM
Try to see if you can figure this one out.
This reference to the umbraco XML structure will help you out.

The @level attribute will be your friend here ;)

If you get really stuck I can help you.


Apr 30, 2009 at 12:47 PM
Edited Apr 30, 2009 at 12:48 PM
You're right, it wasn't that hard:

<xsl:if test="$parentNode/@level &gt; 1">

<a class="leftArrow backLink" href="{umbraco.library:NiceUrl($parentNode/@id)}">

Back to <xsl:value-of select="$parentNode/@nodeName"/>