I have a problem with Xslt. I wrote an Xslt-macro that reads all 'arrangements' from the 'ArrangementsArea' node. My content tree looks like this:
To read out the Arrangement items ('meeneemlunch', 'picnic', 'pizzabuffet') on the home page, I put an Xslt-macro on the Master template. This is my Xslt-code:
problem with Xslt
Hi,
I have a problem with Xslt. I wrote an Xslt-macro that reads all 'arrangements' from the 'ArrangementsArea' node. My content tree looks like this:
To read out the Arrangement items ('meeneemlunch', 'picnic', 'pizzabuffet') on the home page, I put an Xslt-macro on the Master template. This is my Xslt-code:
<xsl:template match="/">
<ul class="nice-list">
<xsl:for-each select="$currentPage/following-sibling::ArrangementArea/Arrangement[@isDoc]">
<li><a href="{umbraco.library:NiceUrl(1076)}#{arrangementTitle}"><xsl:value-of select="arrangementTitle"/></a>
<div class="left"><a href="#">Introtekstje...</a></div>
<div class="right"><xsl:value-of select="umbraco.library:ShortDate(@createDate)"/></div>
<div class="clearer"> </div>
</li>
</xsl:for-each>
</ul>
</xsl:template>
The problem though is that the Arrangement items are only read out on the Homepage, and not on the other pages, like the 'Arrangements' page itself.
I guess I have to change the XPath axis in my for-each loop, but I don't know how.
Does anyone know how I can make the Arrangement items render on all pages, and not only on the Home page?
Thanks for your help,
Anthony Candaele
Belgium
Hi Anthony,
Create an intermediate variable that references your "Site" node, and use that - it makes everything read much better:
/Chriztian
Hi Chriztian,
Problem solved! Thanks for the help, you rock!
greetings,
Anthony
is working on a reply...