Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • John Walker 43 posts 66 karma points
    Jan 13, 2011 @ 18:56
    John Walker
    0

    Topic comments count

    Hello all,

    I am trying to extend on the basic paging withing the UForum project and need to work out how I can get a count of the comments against a topic. My latest attempt is below;

    <xsl:variable name="topicID" select="number(umbraco.library:ContextKey('topicID'))"/>
    <xsl:variable name="topic" select="uForum.raw:Topic($topicID)/topics/topic"/>
    <xsl:value-of select="count($topic/comment)"/>

    Any help would be much appreciated.

    John

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jan 13, 2011 @ 20:18
    Jan Skovgaard
    1

    Hi John

    Does your count return anything? Or does it return a wrong number?

    do you get any xml out if you write this

    <textarea>
    <xsl:copy-of select="$topic" />
    </textarea>

    ?

    /Jan

  • John Walker 43 posts 66 karma points
    Jan 14, 2011 @ 09:50
    John Walker
    0

    Thanks Jan,

    I had not actual needed to right out the xml to screen, being my first umbraco site! But that has helped me loads can now see the field I need;

    <replies>11</replies>

     

Please Sign in or register to post replies

Write your reply to:

Draft