We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30128
    • 78 Posts
    Hi,

    I don’t manage to turn off comments! Not that i thought I had turned them on... on one page I use this snippet call:
    [[Ditto? &startID=`2` &tpl=`ditto_fullBlog` &sortBy=`createdon` &total=`1` &extenders=`dateFilter` &dateFormat=`%d.%m.%Y` &trunc=`0` &paginate=`0`]]
    where the ditto_fullBlog tpl looks like this:
    <div class="ditto_summaryPost">
      <h3><a href="[~[+id+]~]" title="[+title+]">[+title+]</a></h3>
      <div class="ditto_info" >Av <strong>[+author+]</strong> on [+date+]. <a  href="[~[+id+]~]#commentsAnchor">Kommentarer
      ([[Jot? &docid=`[+id+]` &action=`count-comments`]])</a></div>
      [+content+]
      <div class="ditto_tags">Tags: [+tagLinks+]</div>
    </div>
    This then display the latest post in full. However, after this post comes the standard comments part from Jot, which I don’t want shown. This seems to come from the news page I call (2), since it uses the same div id’s as the jot chunk from that page. The ditto call on pageID=2 is this:
    [[Ditto? &startID=`2` &summarize=`3` &total=`20` &commentschunk=`Comments` &tpl=`nl_blog` &paginate=`1` &alwaysshow=`1`]]
    and the Comments chunk:
    <div id="commentsAnchor">
    [!Jot? &customfields=`name,email` &subscribe=`1` &pagination=`8` &badwords=`dotNet` &canmoderate=`Bloggers` !]
    </div>
    How can I remove the comments section from appearing when I use my first call? I’ve even tried to create an empty ’noComments’ chunk and explicitly told Ditto to use this, but to no avail.

    So in summary: I want to keep comments on my main news page (2), but on the page where I display the latest post in full, I do not want to show the comments. Can this be done? I think I am missing something simple here...
      • 18397
      • 3,250 Posts
      What Ditto and MODx versions are you using?

      Note: Ditto 2 or later uses &removeChunk instead of commentschunk
        • 30128
        • 78 Posts
        MODx 0.9.6 and the default Ditto that came with it (2.0.2). I upgraded from MODx 0.9.5, but that seems to have gone entirely smoothly.

        So I can use removeChunk to explicitly remove a chunk? I just don’t understand why the comments are displayed in the first place.

        Hey! That worked smiley Swell! Thx a ton. So, the comments chunk was indeed pulled in by the call to my default news page, which did use the comments chunk. Am I correct? Just so I understand how things work and can fix them easier myself next time.
          • 18397
          • 3,250 Posts
          If you put the comments chunk at the end of the content field then, yes, Ditto will pull it in.