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

    [[Ditto? &startID=`2` &tpl=`masthead` &dateSource=`editedon` &summarize=`1` &total=`1` &showInMenuOnly=`1`]]

    With this code I display the last ’editedon’ item, but I would like to display the previous ’editedon’ something like ’editedon - 1’ ... how to do this with ditto?

    If something is not clear please let me know smiley
      • 3707
      • 241 Posts
      Can’t you just change the number of documents retrieved so you display the last 2: &total=`2`
        • 8161
        • 39 Posts
        Thanks for the fast replay, but no I need the previous ’editedon’ - 1 only ... and I need to display only one.
          • 3707
          • 241 Posts
          Ah, I see what you mean. Try adding &start=`1` to the Ditto call so it skips the first record.
            • 36592
            • 970 Posts
            Quote from: dtstyle at Oct 22, 2008, 01:39 PM

            [[Ditto? &startID=`2` &tpl=`masthead` &dateSource=`editedon` &summarize=`1` &total=`1` &showInMenuOnly=`1`]]
            

            With this code I display the last ’editedon’ item...
            Do you really ?

            I think the output is sorted by ’createdon’ with Ditto default.
            You need to add &orderBy=`editedon DESC` to sort by last edited time.
              • 8161
              • 39 Posts
              Yeah it works smiley

              This is the code I need:

              [[Ditto? &startID=`2` &tpl=`masthead` &dateSource=`editedon` &summarize=`1` &total=`1` &showInMenuOnly=`1` &orderBy=`editedon DESC` &start=`1`]]