Using the ParentPageLink.xlst

Apr 30, 2009 at 11:33 AM

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 11:35 AM
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 11:47 AM
Edited Apr 30, 2009 at 11:48 AM
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"/>