Looking for some help. Have a products landing page, with a number of products sub pages.
Products - product one - product two
All product pages have a radio list data type to choose the type of product. The xslt below lists all of the products, but I cannot get it to show the parent link. The xslt is only used on the sub pages.
<xsl:template match="/"> <ul> <li> <xsl:variable name="preValueId" select="./@id" /> <a href="#"><!-- needs to be href of parent page of all products--> <xsl:attribute name="class">selectDrop</xsl:attribute> <xsl:text>All Products</xsl:text><!-- should be parent nodeName --> </a> <ul> <xsl:for-each select="$currentPage/ancestor-or-self::node /node[data[@alias='productType']]"> <li> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:if test="$currentPage/ancestor-or-self::node/data[@alias='productType'] = ./@id"> <xsl:attribute name="class">selectArea</xsl:attribute> </xsl:if> <xsl:if test="$currentPage/@id = current()/@id"> <xsl:attribute name="class">select</xsl:attribute> </xsl:if> <xsl:value-of select="@nodeName"/> </a> </li> </xsl:for-each> </ul> </li> </ul> </xsl:template>
Display Link to Parent
Hi All
Looking for some help. Have a products landing page, with a number of products sub pages.
Products
- product one
- product two
All product pages have a radio list data type to choose the type of product. The xslt below lists all of the products, but I cannot get it to show the parent link. The xslt is only used on the sub pages.
Using Umbraco 4.0.4.2
Thanks again
Eddie
Hi Eddie,
At a guess, this should work
I always find this page really helpful http://umbraco.org/documentation/books/xslt-basics/xpath-axes-and-their-shortcuts
Rich
Hi Rich
Will give it a try and thanks for the wiki reference.
Thanks
Eddie
is working on a reply...