I am really lost in trying to use Ditto to set up a simple news publishing system. I would ideally like to display, on my home page, an abbreviated summary listing of the latest two news items, complete with date and a title. I don’t need to commenting or anything fancy.
I would also like to easily be able to add news items either from the manager or outside (it doesn’t really matter). Supposedly this is an easy process but I just can’t get my head around to figuring what I have to do. Ideally I’d like Ditto for Dummies or at least a step by step procedure.
I am using Ditto 2 because I believe it has replaced NewsPublisher and do the same things.
Alternatively is there commercial support for setting something like this up?
Thanks
-
☆ A M B ☆
- 24,524 Posts
In the Manager, create a document that will act as a container for your news pages. It can be published or not, show in the menu or not, as you wish. Now under that document (right-click on it and choose "Create Document Here", or else assign it to be the "parent" of your individual news item documents as you create them) make your individual news items. The easiest way is to create the first one, then duplicate it in place and edit the duplicate to make the rest.
On your home page, put the [!Ditto? ... !] tags where you want the list to be. Study the Ditto documentation for the paramters you need for the output you want. Create a new chunk with the HTML you want each item to have and add that (&tpl=`chunkname`) to the Ditto call. Again, the documentation has some examples.
You can also set up a snippet to allow you to create and edit documents from the front-end, but I would wait on that until you have the basics of snippets and document creation well understood.
-
☆ A M B ☆
- 24,524 Posts
That’s one thing about MODx that is both a great feature and a great responsibility. There are so many different ways of doing just about everything that you can do whatever best suits your purpose or maybe just suits your fancy. But that means you need to 1. really know your purpose (
http://modxcms.com/forums/index.php/topic,20316.msg125898.html#msg125898 ) and 2. find out all the different ways it can be done.
The Wiki is a good source of ideas and information, but it is written by the user community, and so will reflect the submitting user’s way of doing things, not necessarily the only way.
Searching on "Reflect" will also give some good ideas:
http://modxcms.com/forums/index.php/topic,14003.0.html
Thanks guys. I got it going and Ditto is great! Pretty simple once I got the concept right.