For some reason, I can’t get my wordpress-style archives to work with Ditto/Reflect. I’ve followed the instructions on ditto.modxcms.com as closely as I can, but it’s not working. Here are the calls and template I’m using:
The Reflect call:
[!Reflect?config=`wordpress` &targetID=`21` &getDocuments=`1` &dittoSnippetParameters=`parents:15` &id=`wp`!]
15 is the container all my news items are in. 21 is the document for the archives.
In document 21, I have the following, including the ditto call:
<h3>[+wp_month+] [+wp_year+]</h3>
<ul>[!Ditto? &id=`wp` &extenders=`dateFilter` &parents=`15` &tpl=`newsArchiveTemplate` &dateFormat=`%d %B %Y` &filter=`id,21,2|id,37,2`!]</ul>
I’m filtering out document 37 because it’s my rss feed.
The chunk newsArchiveTemplate is simply:
<li><a href="[~[+id+]~]" title="[+pagetitle+]">[+pagetitle+]</a> - <em>[+date+]</em></li>
I’m having two main problems with this.
Firstly, I have one news item in May and three in July. But whichever month, either May or July, I click on, I always get the three news items in July listed and never the one from May.
Secondly, the [+wp_month+] [+wp_year+] don’t seem to be displaying the month and year.
So, any idea what I’m doing wrong?
One other thing, is it possible to filter out any documents from the Reflect call? The document 37 (created in August) is making reflect show an archive for August, even though there are no news items in August.