We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8770
    • 21 Posts
    Hey, I seem to be having a couple problems with Ditto.

    First, I’m trying to display articles using the following code:

    [[Ditto? &tpl=`DittoTemplate` &startID=`11` &summarize=`10` &sortDir=`DESC` &displayArchive=`1` ]]

    However, it isn’t displaying the articles in descending order, rather in ascending.

    Also, the archive is outputting way too many articles. Is it possible to limit the number of articles to 5, with a link to a full archive page??

    Thanks in advance,
    Mike
      • 18397
      • 3,250 Posts
      Yes, it is possible to control the number of articles retrieved by using the &total paramater (just to summarize+number in the archive to get the # you want).

      For sorting, Ditto defaults to DESC sorting so you should not need to set that.
        • 8770
        • 21 Posts
        Ok, is it possible to have a link for all of the archives for that Id?
          • 18397
          • 3,250 Posts
          For which ID?
            • 8770
            • 21 Posts
            Sorry, I guess I wasn’t clear: I want to be able to show, say 3 "archived" articles in the archive under my news and then have a link that says "View full Archive" that goes to a page that lists all archived articles. Is that possible?
              • 18397
              • 3,250 Posts
              Yes, create a page called Archive and then put the same call you are using now but set summarize to 0 and start to whatever you were using for total. Then just link to that page under that Ditto call.