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 am trying to group form entries on a page using XSLT. Basically I want them grouped by pageid so something like this but it doesn't work!
<ul> <xsl:for-each select="(umbraco.contour:GetRecordsFromForm('212c46db-c878-437c-bb61-59142db20cbd')//uformrecord)"> <xsl:sort select="pageid" data-type="number" order="ascending"/> <xsl:if test="following-sibling::*[1]/pageid != pageid"> <li>Venue: <xsl:value-of select="fields/venueanddate/values/value"/></li> </xsl:if> <li><xsl:value-of select="concat(pageid,': ',fields/venueanddate/values/value,': ',fields/forename/values/value,' ',fields/surname/values/value,': ',fields/pin/values/value)"/></li> </xsl:for-each> </ul>
I've worked it out, gosh XSLT is horrid, so glad I no longer have to use it regularly!
<xsl:variable name="sortedcopy"> <xsl:for-each select="umbraco.contour:GetRecordsFromForm('212c46db-c878-437c-bb61-59142db20cbd')//uformrecord"> <xsl:sort select="pageid" data-type="number" order="descending"/> <xsl:copy-of select="current()"/> </xsl:for-each> </xsl:variable> <xsl:variable name="relItems" select="msxml:node-set($sortedcopy)" /> <xsl:for-each select="$relItems/uformrecord"> <xsl:if test="(preceding-sibling::uformrecord[1]/pageid != current()/pageid) or not(preceding-sibling::uformrecord[1])"> <li><strong>Venue: <xsl:value-of select="fields/venueanddate/values/value"/></strong></li> </xsl:if> <li><xsl:value-of select="concat(fields/forename/values/value,' ',fields/surname/values/value,': ',fields/pin/values/value)"/></li> </xsl:for-each> </ul>
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.
Continue discussion
Grouping form entries in XSLT
I am trying to group form entries on a page using XSLT. Basically I want them grouped by pageid so something like this but it doesn't work!
I've worked it out, gosh XSLT is horrid, so glad I no longer have to use it regularly!
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.