And I don't know have to modify this XSLT to get the name field (#Comment-Name) for example:
<xsl:variable name="records" select="umbraco.contour:GetApprovedRecordsFromPage($currentPage/@id)/uformrecord[state = 'Approved']" />
<!-- Display the number of records -->
<div id="recordscount">
<xsl:choose>
<xsl:when test="count($records) = 0">
(0) comments
</xsl:when>
<xsl:when test="count($records) = 1">
(1) comment
</xsl:when>
<xsl:otherwise>
(<xsl:value-of select="count($records)"/>) Comments
</xsl:otherwise>
</xsl:choose>
</div>
<textarea><xsl:copy-of select="umbraco.contour:GetRecordsFromForm('7a307e8c-d592-4dd8-a6ba-0e711f4a9b2e')"/></textarea>
<div id="records">
<!-- Loop all records -->
<xsl:for-each select="$records">
<div class="record">
<div class="commentTxt">
<!-- Display 'Comment' field of the record, make sure there is a field called 'Comment' on the form -->
<xsl:value-of select="umbraco.library:ReplaceLineBreaks(.//fields/Comment//value)" disable-output-escaping="yes"/>
</div>
</div>
</xsl:for-each>
</div>
Show list of comments - multilanguage
Hi,
I want to show a list of comments, but my problem is that my fields are called #Comment-Comment, #Comment-Name because the site is multilanguage ...
I have tried this razorscript:
And I don't know have to modify this XSLT to get the name field (#Comment-Name) for example:
Best regards
Kim
Comment author was deleted
In razor could you try without the # so @record.Comment-Comment an if that doesn't work try @record.CommentComment
Let me know if that does the trick
Comment author was deleted
Same for xslt try without the # and withough the -
Comment author was deleted
btw the dynamic object are part of Contour if you use v3 and up (not sure the addons you are using support the dictionary)
Comment author was deleted
Well for the xslt one you should be able to see the xml in the textarea
So that should show you how the element is named
Hi Tim,
The xslt works with:
For the field '#Comment-Comment' - So that's great!
Sadly, I didn't get the Razor script to work :( Even with different combinations of @record.Comment-Comment
But Thanks for your help!
is working on a reply...