I am using Ditto in the template that formats the Home page of a site in development in order to post summaries of news items that reside, individually, as documents within a News container. The call I am using is as follows, and everything is working as expected:
[!Ditto? &parents=`10` &sortBy=`createdon` &tpl=`Ditto1` &display=`2` &noResults=<p>There are no news items at this time.</p>!]
Now, I am using a separate Ditto call (in a separate template) so that when a specific news item is clicked on the home page, the page that opens will include summary information (Doc Title, Longtitle, etc) about the selected news item. The problem is as follows: I do not know how to have Ditto select the summary information that is specific to the news item that gets clicked on the Home page. As things currently stand, when someone clicks on a news item on the Home page, although the main content for that news item does display in the page that opens, the summary information that displays (via the Ditto call) is the same for all of the news items. Here is the second Ditto call I am using for the individual news pages:
[!Ditto? &parents=`10` &tpl=`Ditto2` &display=`1` &noResults=<p>There are no news items at this time.</p>!]
How do I create a generic Ditto call so that the Summary info (Doc Title, Longtitle, etc) associated with a specific News document is the same summary info that displays when the link for that document gets clicked on the Home page?
I hope I expressed this issue clearly and that someone can shed a bit of light on how I need to refine my call.
Thanks MODx team.
KP -
Yeah, seems as though I really do not need the second ditto call at all -- all I need to do is place the appropriate tags (ex. [*longtitle*] ) in the template. Ditto functionality is still fairly new to me and I somehow thought I needed it in this case as well.
I thank you for the very helpful insights.