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

    when I’m getting an archive list of my older documents, the categories (years) and sub-categories (months) have a link - clicking on those links doesn’t do anything other than refreshing the page I guess - Am I missing something here - what’s the purpose of those links and how do I use them.
    thank you for your help
      • 18397
      • 3,250 Posts
      You need to set &targetID to any MODx document with a Ditto call setup with extenders=`dateFilter` and make sure both have the same &id set.

      These links will then only show documents created in that timeframe on that page.
        • 19889
        • 616 Posts
        Quote from: Mark at Feb 24, 2007, 11:58 AM

        You need to set &targetID to any MODx document with a Ditto call setup with extenders=`dateFilter` and make sure both have the same &id set.

        These links will then only show documents created in that timeframe on that page.

        I’m not sure whether I really got what you’re saying - is there an example somewhere to get an idea how this is used.

        thanks again for your help Mark
          • 18397
          • 3,250 Posts
          You would have a Reflect call like so [!Reflect? &id=`myDittoCall`&targetID=`#`&dittoSnippetParameters=`startID:x` where # is the ID of the page with this content:


          [!Ditto? &startID=`x` &summarize=`all` &id=`myDittoCall` &extenders=`dateFilter`!]


          You would need to set the startID "x" to be the same on both.
            • 19889
            • 616 Posts
            Quote from: Mark at Feb 24, 2007, 01:50 PM

            You would have a Reflect call like so [!Reflect? &id=`myDittoCall`&targetID=`#`&dittoSnippetParameters=`startID:x` where # is the ID of the page with this content:


            [!Ditto? &startID=`x` &summarize=`all` &id=`myDittoCall` &extenders=`dateFilter`!]


            You would need to set the startID "x" to be the same on both.

            Hello Mark,

            Thank you for replying - the calls above are the calls for ditto 2.0 rc2, right? This is what I get at the moment:

            MODx encountered the following error while attempting to parse the requested resource:
            « `95 ` is not numeric and may not be passed to makeUrl() »
              • 18397
              • 3,250 Posts
              Could you copy and paste both your calls?
                • 19889
                • 616 Posts
                Quote from: Mark at Feb 25, 2007, 12:33 AM

                Could you copy and paste both your calls?

                [!Ditto? &startID=`26` &summarize=`all` &id=`myDittoCall` &extenders=`dateFilter`!]
                

                [!Reflect? &id=`myDittoCall` &targetID=`97` &dittoSnippetParameters=`startID:26`!]
                


                with these two calls, I’m getting "The Ditto object is invalid. Please check it."

                the document with the reflect call is ID98 ; the one with the ditto call is ID97 and the news folder is ID26.
                  • 18397
                  • 3,250 Posts
                  Oh, I forgot on the reflect call you need to add &getDocuments=`1`
                    • 32847
                    • 171 Posts
                    Hello,

                    what about other languages for the month?
                    Reflect snippet works and it’s great but I have no output whether I add setlocale (LC_ALL, ’fr_FR’); in the Ditto snippet code as I used to add undecided
                      • 18397
                      • 3,250 Posts
                      Reflect generates its own dates locally without using Ditto. You would need to set the locale in the Reflect snippet.