Hi There,
I’m trying to use Reflect using `pub_date` as the date source instead of the default `createdon`. However, I suspect I’m not using the date formating correctly as nothing is displayed at all, or if I use the default Reflect templates, everything has the Jan 1970 date.
Here’s the Ditto call referenced in the Reflect script below incase this is the issue - &id=`news`:
[!Ditto? &id=`news` &parents=`[*contentID1*]` &tpl=`newsHomeTpl` &showInMenuOnly=`1` &orderBy=`menuindex ASC` &paginate=`1` &display=`10` &paginateAlwaysShowLinks=`1` &tagData=`tags` &tagDelimiter=`, ` &tagDocumentID=`55`!]
Here’s the Reflect call (btw I’m trying to display this archive list in a sidebar chunk):
<div class="widget">
[!Reflect? &id=`news` &targetID=`[*contentID1*]` &getDocuments=`1` &dittoSnippetParameters=`startID:[*contentID1*]` &showItems=`0` &showInMenuOnly=`1` &dateSource=`pub_date` &tplContainer=`monthlyArchiveTpl` &tplYear=`monthlyArchiveYearTpl` &tplMonth=`monthlyArchiveMonthTpl` &phx=`1`!]
</div>
Here’s the &tplContainer:
<h3>Archives</h3>
<ul class="reflect_archive">
[+wrapper+]
</ul>
Here’s &tplYear:
<li class="reflect_year">
<a href="[+url+]" title="[+year:date=`%Y`+]" class="reflect_year_link">[+year:date=`%Y`+]</a>
[+wrapper+]
</li>
And here’s &tplMonth:
<li class="reflect_month">
<a href="[+url+]" title="[+month:date=`%n`+] [+year:date=`%Y`+]" class="reflect_month_link">[+month:date=`%n`+]</a>
[+wrapper+]
</li>
I don’t have PHx installed as it causes Jot not to work (another issue here
http://modxcms.com/forums/index.php/topic,12828.20.html) but I’d understood that PHx is included in Ditto calls - I also tried to force it in the Reflect call by using &phx=`1`.
Any pointers would be appreciated, I’m completely stumped.
Cheers
Ben