Have a 'AwardsItem' document type with a property called year. Would like to group the items by year and thougth I'd try at using keys. I'm using the old schema and Umbraco 4.0.4.2.
<!-- The fun starts here --> <xsl:for-each select="$currentPage/node [@nodeTypeAlias = $documentTypeAlias and (key('year', string(./data [@alias='year'])))]">
Using keys in Old Schema
Hi All,
Have a 'AwardsItem' document type with a property called year. Would like to group the items by year and thougth I'd try at using keys. I'm using the old schema and Umbraco 4.0.4.2.
I have the following:
Been a while since I've used the old schema version version, so not sure of the syntax required for using keys.
Example XML:
Thanks,
Eddie
Hi Eddie,
Try this...
The "match" is matching against all nodes that have an alias of "AwardItem", using the "year" property as the index.
Cheers, Lee.
Hi Lee,
Much appericated and thanks for the quick response.
Finshed xslt below - just incase anyone needs a similiar solution to group items by year.
Thanks,
Eddie
is working on a reply...