Ditto

From MODx Wiki
Jump to: navigation, search

 MODx Snippet 

Ditto v2.0.2
Author 
Mark Kaplan
MODx Versions 
>= 0.9.5
Last Updated 
4/08/2007


Ditto aggregates documents to create blogs, article/news collections, and more, with full support for templating.

It lists data from documents to create output in many formats. You can specify which documents, you can specify what data, and you can specify the layout of that data. It is the offspring of NewsListing, but was given a snappier name as it doesn't just list news.

Official documentation is available at http://ditto.modxcms.com

Examples of Usage

[!Ditto? &parents=`183`&orderBy=`createdon ASC` &display=`5`
  &total=`5` &tpl=`story_summary`!]

Note: The above example uses Ditto 2.1 parameters. Ditto 2.0 replaced &startID with &parents and &documents, both of which can be comma-separated lists, and &summarize was replaced by &display. Ditto 2.1 replaced &sortBy and &sortDir with &orderBy, combining data for both and allowing for sub-sorting using a comma-separated list.

Above example using Ditto 1 parameters would read:

[!Ditto? &startID=`183`&sortBy=`createdon` &sortDir=`ASC` &summarize=`5`
  &total=`5`&tpl=`story_summary`!]

In this example, there's a Chunk named "story_summary" that looks like this:

<h3>[+menutitle+]</h3>
<p>[+introtext+]<a href="[~[+id+]~]">More &gt;&gt;</a></p>

Reference

Tutorials

Read more tutorials at http://ditto.modxcms.com/tutorials.html

Other Documentation Sources

Personal tools