We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14557
    • 48 Posts
    Can anyone point me at some example code for setting up Reflect to do a Ditto Month by Month archive please? Couldn’t work it out from the Ditto documentation, I just get an error "The Ditto object is invalid. Please check it."

    Thanks

    John
      • 18397
      • 3,250 Posts
      MARKSVIRTUALDESK Reply #2, 17 years ago
      1. Make sure you are using the latest version of Reflect bundled with Ditto 2.0.2
      2. Copy the following call [[Reflect?config=`wordpress` &targetID=`2` &getDocuments=`1` &dittoSnippetParameters=`startID:2`]]
      3. Change the 2 to the container holding your blog entries and has &extenders=`dateFilter` in its call.
        • 14557
        • 48 Posts
        Thanks again Mark. I now have this in a test page:
        [[Reflect?config=`wordpress` &targetID=`681` &dittoSnippetParameters=`startID:148`]]
        There are blog posts within folder 148, and page 681 contains a ditto call:
        [!Ditto?startID=`148` &tpl=`BlogEntry` &extenders=`dateFilter`!]

        There are still a couple of problems:
        1) The Ditto call always displays the most recent posts (as if the extender isn’t working)
        2) The month archive list is in the wrong order when the months are for previous years:
        * January 2007
        * February 2007
        * March 2007
        * April 2007
        * June 2006
        * July 2006
        * August 2006
        * September 2006
        * October 2006
        * November 2006
        * December 2006

        Any ideas?
          • 14557
          • 48 Posts
          Not sure about the date ordering problem yet, but the other problem is solved by including &getDocuments=`1` in the reflect call.
            • 18397
            • 3,250 Posts
            MARKSVIRTUALDESK Reply #5, 17 years ago
            Try upgrading to the latest development edition for problem number 2.
              • 14557
              • 48 Posts
              Actually, I’ve just worked it out. I had to set &monthSortDir=`DESC` to fix it. For some reason the default for years is DESC but months is ASC so you get the odd sort order.

              Thanks again for your help,

              John
                • 18397
                • 3,250 Posts
                MARKSVIRTUALDESK Reply #7, 17 years ago
                That was what I changed in the dev version, specifically in the "wordpress" config file. It normally sorts like that since it displays a list by year then by month.
                  • 7260
                  • 107 Posts
                  Does Reflect only work in 0.96?

                  I cant get it to work, Im using 0.95.
                  Ive tried a dozen examples and I cant get it to work..its....driving.... me.. nuts...
                  shocked

                  TY
                    • 18397
                    • 3,250 Posts
                    Reflect works fine in both 0.9.6 and 0.9.5. Remember, for Reflect to work you must have the version of Ditto it was bundled with installed. This should give you some examples: http://ditto.modxcms.com/tutorials/wordpress-style-archives.html
                      • 7260
                      • 107 Posts
                      Ok , Thank you-
                      But Ive tried that and it does not work right for me Ive also tried this...
                      But it only results in One Month...


                      update

                      unbelievable it appears most of my misery has been caused by a slight misspelling...
                      now after adjusting some parameters im on the right track...

                      Thanks for your attention..