Hi, Ive got problem with latest news with Ditto. I’ve found some posts about it, but no one answer my issue (which regards basics...): what code should I put on home page to have listing of latest five blog entries , just titles, without summary?
Well, you’re going to need to set up a few things to just get a title in your Ditto output and have the parameters you are requesting. Let’s take your example from the top down. Here’s an example Ditto call for what you’re requesting:
[!Ditto? &startID=`2` &tpl=`newsTPL` &summarize=`5` &sortDir=`ASC` &sortBy=`pub_date` !]
To begin, the "&startID" needs to be the ID of the parent which is the container for the blog postings. So if the unique ID of the parent is "2", put &startID=`2` ...
Next, have "&summarize" equal to 5 since you want the last 5 postings. The "&sortDir" will control whether the postings are ascending (ASC) or descending (DESC). You need to define how they’re sorted (by publication date or menuindex, etc.). In my example above I chose to sort by publication date (pub_date).
Next you need to define your tpl value which tells ditto what information to show. You just wanted titles, so create a chunk named whatever you want (in my example I made it to be "newsTPL") ... in that chunk, if you just wanted the pagetitle to appear, you would just put the following into your chunk:
or you could put:
Hopefully that makes sense.