Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I can sucessfully group the output of a Repeatable Custom Content v2 datatype... as long as there is only one page. As soon as I add a sibling page, the output displays everything from all pages instead of just the one page.
What am I doing wrong?
<xsl:param name="currentPage"/> <xsl:key name="sections" match="item" use="./data [@alias='section']" />
<xsl:template match="/">
<xsl:for-each select="$currentPage/articles/items/item [count(. | key('sections', ./data [@alias='section'])[1]) = 1]"> <xsl:value-of select="./data [@alias = 'section']"/><br />
<xsl:for-each select="key('sections', ./data [@alias='section'])"> <xsl:value-of select="./data [@alias = 'title']"/></span></strong><br /> </xsl:for-each> </xsl:for-each>
</xsl:template>
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Grouping output of Repeatable Custom Content
I can sucessfully group the output of a Repeatable Custom Content v2 datatype... as long as there is only one page. As soon as I add a sibling page, the output displays everything from all pages instead of just the one page.
What am I doing wrong?
<xsl:param name="currentPage"/>
<xsl:key name="sections" match="item" use="./data [@alias='section']" />
<xsl:template match="/">
<xsl:for-each select="$currentPage/articles/items/item [count(. | key('sections', ./data [@alias='section'])[1]) = 1]">
<xsl:value-of select="./data [@alias = 'section']"/><br />
<xsl:for-each select="key('sections', ./data [@alias='section'])">
<xsl:value-of select="./data [@alias = 'title']"/></span></strong><br />
</xsl:for-each>
</xsl:for-each>
</xsl:template>
is working on a reply...