Hi,
I am just trying to come to grips with a few of the possibilities of MODx. One of the things I would like to do is automate the display of an index page for an article library. I have set up a folder called "library" with some sub-folders named as the article categories. The articles themselves are the documents in the ’category’ sub-folders. Is it possible to use Ditto to display a hierarchical output of categories (as sub-headings) with a list of links to the relevant articles displayed underneath each?
Thanks in advance for any advice on this. Also, seeing as this is my first post, I should add - a big thanks to all involved for the great work with MODx and its ancillary applications.
Anton
-
MODX Staff
- 12,272 Posts
Ditto will take care of everything you need. Or Wayfinder, depending on how much extra text you need to go with the summary list.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
At the moment Ditto is not capable of hierarchal display. It can aggregate all of the documents to the nth depth but it can’t display them in a hierarchal fashion. You may wish to try Wayfinder as it is closer to what you describe.
Perhaps I should clarify. In this instance the hierarchy only consists of 2 levels: categories (sub-folders within the main library folder) and articles (held within each sub-folder). What I want to do is insert one snippet call that iterates through the sub-folders and applies a ’heading’ template to those (no links to the folders) and then dive down into the articles within each folder and apply an item summary template (displaying links) to each of those.
I understand how to use Wayfinder to generate hierarchical nested lists, but what is needed here (unless I am mistaken) is a means to apply a different HTML template at each of the two levels of the simple hierarchy.
Any suggestions on how to go about this?
Thanks,
Anton