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
Hi I'm using contour and wants to get a list of records, but filter out records without a comment field.
<xsl:variable name="records" select="umbraco.contour:GetRecordsFromPage($currentPage/@id)" />
returns all records, but not limited to records with comments.
When I add this:
<xsl:variable name="records" select="umbraco.contour:GetRecordsFromPage($currentPage/@id)/uformrecord/fields/comment" />
I get the right records - bu t only the comment values.
I've did also try with
<xsl:variable name="records" select="umbraco.contour:GetRecordsFromPage($currentPage/@id)/uformrecord/fields[comment !='']" />
But that does'nt return anything
How do I get the full record but limit it to those with comments?
Try this:
<xsl:variable name="records" select="umbraco.contour:GetRecordsFromPage($currentPage/@id)/* [./fields/comment]" />
Well, the above checks to see if the comment node is there...if the comment node always exists regarldess of it contains data, try:
<xsl:variable name="records" select="umbraco.contour:GetRecordsFromPage($currentPage/@id)/* [not(normalize-space(./fields/comment))]" />
Thanks Tom - that did it, although the XML format changed a bit
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
list only items which contains certain field
Hi I'm using contour and wants to get a list of records, but filter out records without a comment field.
<xsl:variable name="records" select="umbraco.contour:GetRecordsFromPage($currentPage/@id)" />
returns all records, but not limited to records with comments.
When I add this:
<xsl:variable name="records" select="umbraco.contour:GetRecordsFromPage($currentPage/@id)/uformrecord/fields/comment" />
I get the right records - bu t only the comment values.
I've did also try with
<xsl:variable name="records" select="umbraco.contour:GetRecordsFromPage($currentPage/@id)/uformrecord/fields[comment !='']" />
But that does'nt return anything
How do I get the full record but limit it to those with comments?
Try this:
Well, the above checks to see if the comment node is there...if the comment node always exists regarldess of it contains data, try:
Thanks Tom - that did it, although the XML format changed a bit
is working on a reply...