-
- 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
-
- 3,250 Posts
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.
-
- 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?
-
- 48 Posts
Not sure about the date ordering problem yet, but the other problem is solved by including &getDocuments=`1` in the reflect call.
-
- 3,250 Posts
Try upgrading to the latest development edition for problem number 2.
-
- 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
-
- 3,250 Posts
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.
-
- 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..