-
☆ A M B ☆
- 1,231 Posts
Hello,
Could someone tell me how exactly to include the placeholders in a chunk as they never appear to work correctly.
An example of my Tpl is below but the summary is not showing. I have typed out a summary in the box of the documents. I have tried other placeholders and they don’t seem to work. I’m using the latest ditto and using this call
[[Ditto? &startID=`29` &tpl=`dittoTpl` &summarize=`40` &total=`40` &sortBy=`createdon` &sortDir=`ASC` ]]
<div class="ditto_item" id="ditto_item_[+id+]">
<h3><a href="[~[+id+]~]">[+pagetitle+]</a> || Last Update : [+date+]</h3>
<p>[+summary+]</p>
</div>
I would like to have the page name appear and be clickable with the last edited date... also I would like to include the summary text under so people know what is on each page.
Thanks!
To use [+summary+], use &extenders=`summary`.
To set source of [+date+] as the last edited date&time, use &dateSource=`editedon`.
-
☆ A M B ☆
- 1,231 Posts
Hmmm edited my post.
It worked kind of... how ever if I change the dittoTpl to the following, the whole design is out of shape.
<h3><a href="[~[+id+]~]">[+pagetitle+]</a> || Last Update : [+date+]</h3>
<p>[+summary+]</p>
and also if i actually enclose the ditto call in anything other that a header tag it is all out of shape and wrong.
What could be the problem with this?
-
MODX Staff
- 12,272 Posts
If it’s returning results as expected, but they look wrong, it’s a CSS problem. You should also review the Ditto 2 conversion guide located at ditto.modxcms.com, as you’re using at least one deprecated parameter. The &startID param should now be &parents, which allows you to set one or more parent directory under which you can build results.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
☆ A M B ☆
- 1,231 Posts
Yeah I know about the header tags... it was the only thing that would work. Anyway there was a problem with 2 of my pages ditto was searching... All seems to be displaying correctly now.
Thanks for the help.