Hi!
I’m using Ditto to post news and it works great. I’m facing one problem though. The webpage has one main landing page and five local landing pages. The main landing page displays the 5 most recent news polls from all locations. What I want to do is display which location the news poll is related to (which is the title name of its container).
News Example:
Bangkok - News #1
Tuesday 30, June 2009
Lorem ipsum dolor sit amet, consectetur adipiscing
elit. Pellentesque nec velit justo, vel tempor ante.
Shanghai - News #2
Monday 28, June 2009
Lorem ipsum dolor sit amet, consectetur adipiscing
elit. Pellentesque nec velit justo, vel tempor ante.
My modx structure look like this:
News (container)
- Bangkok (container)
-- News #1 (document)
- Shanghai (container)
-- News #2 (document)
... and so on
Ditto call (where id 7 is the "News" container:
[[Ditto? &parents=`7` &depth=`2` &tpl=`news` &sortBy=`createdon` &summarize=`5` &total=`5` &sortDir=`DESC` &dateFormat=`%A %d, %B %Y`]]
Ditto template:
<div class="newsTopic">[+pagetitle+]</div>
<div class="newsDate">[+date+]</div>
<div class="newsDetail">[+content+]</div>