Hello all,
I’m very new to Modx and am trying to get my head around customizing Ditto calls. I’m probably doing this all the wrong way but here goes...
I have a Chunk with the following inside:
<div id="ditto_item_[+id+]" class="ditto_item">
<div class="NewBlog">
<div class="NewCal">
<div class="Month">
<h5>[+date+]</h5>
</div>
<div class="Day">
<h6>[+date+]<h6/>
</div>
</div>
<div class="NewEntry">
<p3 class="ditto_pageTitle"><a href="[~[+id+]~]">[+pagetitle+]</a></p3>
<p class="space"> </p>
<div class="ditto_introText">[+introtext+]</div>
<br />
<a href="[+url+]">Read more...</a>
</div>
</div>
I have followed this tut to try and make this work:
http://ditto.modxcms.com/tutorials/sort-by-a-date-tv.html
However I want to put ’%d’ in my <div class="Day"> inside my chunk and ’%m’ in <div class="Month"> using placeholders.
Sorry if I’m not explaining myself well enough.
My ditto call:
[!Ditto? &parents=`2` &tpl=`HomeBlogTemplate` &summarize=`2` &paginate=`1` &paginateAlwaysShowLinks=`1` &sortBy=`myDate` &dateSource=`myDate` &dateFormat=`%d` !]
I have also looked at using DittoCal but am struggling with that too...
Please help!!