I'm creating a download macro and I'm listing items from the media section by selecting the media folder they are uploaded to.
I've created a media type Asset, which has potential child nodes, Asset Version.
I can create as many Asset Version's as I like, but I only want the latest Asset Version displayed in my download macro. I've added a label to my Asset Version, versionNumber, that adds a number value created within the same Asset.
e.g. Asset Asset Version - versionNumber = 1 Asset Version - versionNumber = 2 Asset Version - versionNumber = 3
Currently this lists only Asset Version with versionNumber = 1:
<xsl:for-eachselect="$files/Asset"><!-- output here the Asset number /id --><xsl:for-eachselect="AssetVersion[@nodeTypeAlias = 'AssetVersion']"><xsl:sortselect="versionNumber"data-type="number"order="descending"/><xsl:iftest="position()=1"><xsl:call-templatename="Documents"/></xsl:if></xsl:for-each></xsl:for-each>
XSLT list by latest versionNumber value
I'm creating a download macro and I'm listing items from the media section by selecting the media folder they are uploaded to.
I've created a media type Asset, which has potential child nodes, Asset Version.
I can create as many Asset Version's as I like, but I only want the latest Asset Version displayed in my download macro. I've added a label to my Asset Version, versionNumber, that adds a number value created within the same Asset.
e.g. Asset
Asset Version - versionNumber = 1
Asset Version - versionNumber = 2
Asset Version - versionNumber = 3
Currently this lists only Asset Version with versionNumber = 1:
I only want the latest Asset Version to display in my list, and only that version.
Can anybody help?
Cheers JV
My download macro can list multiple Asset's, but should only display one AssetVersion for each.
e.g. Download macro
Solved it:
is working on a reply...