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

    I have to folders set up in modx, latest news and archived news, I would like to have the latest 10 news articles displayed in latest news, then have the rest moved to archived news. So, when a new article is released, what was currently article number 10 gets moved to the top of the archived article list.

    Hope that makes sense, would be really cool if ditto could do something like this.

    Thanks
    Lee
      http://www.blend.uk.com | Web Design by Blend
      • 18397
      • 3,250 Posts
      Ditto does not handle moving documents, only displaying them. You could create this view by having one Ditto call with &summarize=10 to only show to and then a second Ditto call on the archives page using &start=`10` to skip the first 10. If you want to do this literally, you should be able to code a simple snippet that has the following logic:

      If count of articles from Ditto is > 10 get document 10 and set its parent to newparent.
        • 17717
        • 433 Posts
        Thats a great idea, there is no reason why they need phyical be held in separate folders.

        Thanks
        Lee
          http://www.blend.uk.com | Web Design by Blend