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

    I’m trying to configure a MODx installation for working as a blog.

    I’ve learnt to handle templates, chunks, snippets, but I never have used the template variables, because I have no idea about how to use them, and how to create them.

    My Modx blog has two folders in the root: "Posts" (where I store all the posts) and "Comments" (where I store all the comments separated from their respective posts.).

    In the home page, I show the three most recent posts of the blog by a Ditto call snippet:

    [!Ditto? &tpl=`postHomePage` &startID=`24` &summarize=`3` &trunc=`0`!]
    where 24 is the ID os my "Posts" folder.

    The trouble is that if any post has comments more recent than the most recent three posts, then it shows in the page like if they were a new post, and I don’t want that this happens.

    I thought that there was no need to hide "Comments" folder content, because Ditto only should show posts inside 24, that is my "Posts" folder ID. But also it shows all inside "Comments" folder.

    How do I hide "Comments" folder content from listing?

    Really do I need a TV to do this?

    How do I insert it into my Ditto call? Do I need Ditto tags for doing this and can somebody an example of the call I need to do?


    Thanks ... and sorry for my no-native english and the long post. rolleyes
      • 18397
      • 3,250 Posts
      MARKSVIRTUALDESK Reply #2, 20 years ago
      Ditto is not pulling content from your Comments folder, your comments snippet is. See, if you include the comments snippet after each post then when Ditto aggregates the content that call is executed. The simple fix’s:

      Create a new blog template and put the comments call threre

      OR

      Put your comments call into a chunk and call that after each post. Then append &commentsChunk=`chunkname` to the Ditto call to screen it out.