We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25323
    • 17 Posts
    I’m using Ditto to list my news items. Each news item also has commenting enabled (via UserComments). Now, how do I add a comments link (which also states the number of comments) for each news item listed on my news page? If you need an example of what I’m after, its the same as the ModX Blog - http://modxcms.com/blog.html

    Cheers
      • 18397
      • 3,250 Posts
      Use the UserCommentsCount snippet do do this.
        • 25323
        • 17 Posts
        Mark I have installed this snippet but I can’t get it to work. At the moment, my Im using this tag
        Comments ([[UserCommentsCount?]])
        . Its outputting "Comments (0)" at the bottom of the news page.

        How do I get it listing the correct number of comments and for each news item?!
          • 18397
          • 3,250 Posts
          You need to use the paramaters available in the UserCommentsCount snippet. Don’t forget that the document that is being parsed by Ditto has the id [+id+].
            • 25339
            • 6 Posts
            Hi Mark,

            Could you give an example of how to make the call to the UserCommentsCount?

            How do I insert the id into the snippet call? I’m a bit lost.... huh

            Thanks

              • 7923
              • 4,213 Posts
              Quote from: rocccio at Aug 31, 2006, 03:36 AM

              How do I insert the id into the snippet call? I’m a bit lost.... huh
              [[UserCommentsCount? &docid=`[+id+]`]]

              See http://modxcms.com/+UserCommentsCount" target="_blank" rel="nofollow">this and this.


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."