We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 838
    • 15 Posts
    I am trying to use ditto to exclude the latest post in a call to list a section of content. I have tried to below code but I am doing something wrong.

    &filter=`id,[*id*],2`

    The complete call is:
    [!Ditto? &parents=`52` &filter=`id,[*id*],2` &tpl=`newsarticlestemplate_home` &display=`2` !]

    I want it to start listing the articles in this section and exclude the very latest article. I should be easy .. but its not.
    Albert
      • 1122
      • 209 Posts
      All the same, it is rather easy. The following is a quote from Ditto support site:

      tplLast
      Purpose: User defined chunk to format the last document
      You can catch last document with a specific chunk, then format it in a different way or hide.
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        &start=`1` will skip the first item.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 1122
          • 209 Posts
          Last one should be skipped, not first.
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            By default Ditto has the latest item first.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 838
              • 15 Posts
              Thank you all. The &start = ’1’ works just fine. I was manually filtering the new posts every time a new article was uploaded but this is the ultimate. smiley