Hi all,
After going through the blog tutorial on the MODx site, then realizing the NewsListing snippet was replaced by Ditto (might want to update that tutorial...), I was able to implement a news summary page on my test site using Ditto. The summaries as a default show the author and creation date. I’d like to remove them.
I’ve looked into how and it seems there might be several options (modifying the snippet code, using a custom template, or maybe using some kind of parameter).
I’m leery of modifying the snippet code. I’m hoping there’s just a parameter I can toggle. What would be the recommended path for removing these items from the summary and can I get a walkthrough??
Thanks,
Chris
I think that custom templating is the best way.
What is your Ditto call and its template ?
My Ditto call is very simplistic ([[Ditto? &startID=`5` &summarize=`5`]]). I was just trying to get the snippet call to work before going any further.
I guess it’s using a "default" template? Where is that template? Defined by/in the Ditto snippet code?
Chris
You can just add &tpl=`MyDittoTplChunk` to your Ditto call and then create a chunk called MyDittoTplChunk containing the placeholders you want.
Here’s an example of what would go in the chunk:
<item>
<div class="ditto_summaryPost">
<h3>[+title+]</h3>
<div class="ditto_summary">[+summary+]</div>
<div class="seemore"> <a href="[+id+]" title="[+title+]">See more about this story . . .</a> </div>
<!-- REMOVE THIS LINE <div class="postedby">» Posted by [+author+] on [+date+]</div> -->
</div>
<hr/>
</item>
Just take out line with [+author+] and [+date+] and make whatever other changes you need. Some of the divs and classes are mine (for styling the output) and you may not need them. You can pretty much change anything here as long as you use the correct Ditto placeholders (the [+placeholder_name+] thingies) for the parts you want to show.