If I remember correct, media items don't have the @isDoc attribute - so remove that from the apply-templates and change the match attribute to Image instead:
<xsl:apply-templates select="umbraco.library:GetMedia($currentPage/billedmappe, true())/Image[position() mod $n = 1]" />
Splitting a list of media items
I need to split a list of media items into humps of X
<xsl:template match="*[@isDoc]">
<li>
<xsl:for-each select=". | following-sibling::*[@isDoc][position() < $n]">
<a href="{umbraco.library:NiceUrl(@id)}">picname</a>
</xsl:for-each>
</li>
</xsl:template>
What am i mising?
Hi Claus,
What do you get? - and what do you expect?
It *looks* OK, but... I guess it depends a little
/Chriztian
i get an empty url..
i expect to get:
If there are 7 images in the folder
I meant i get an empty <ul></ul>
Ah, OK.
If I remember correct, media items don't have the @isDoc attribute - so remove that from the apply-templates and change the match attribute to Image instead:
and:
/Chriztian
Of course :)
Works perfectly.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.