Hi Guys, as usual let me start by saying that MODX is my CMF of choice.
However I feel that Ditto and Wayfinder, being the two most popular and officially supported snippets for generating lists have some serious shortcomings. I’m not going to get into very technical descriptions, more a general outline, please feel free to correct me if anything I’m saying is incorrect or has a solution.
Let’s start with Wayfinder:
Strengths
- templatable
- outputs tiered lists (with each tier templatable)
- custom classes and "current" identifiers be it tier or item specific
Shortcomings
- cannot filter result sets
- Limited access to result tv’s (please correct me if I’m wrong)
On to Ditto:
Strengths
- templatable (to a degree)
- customisable queries and good control over criteria for determining result sets
- good support for filtering, extending and access to tv’s within individual result items
- pagination support
Shortcomings
- flat list output
- can’t highlight current tier/item without additional snippet usage
Would it not be beneficial to combine the functionality of both into a single core snippet? Both snippets strengths and weaknesses compliment and enhance each other.
At the moment we’re left with large amount of chunks as templates for wayfinder and "configuration packs" for Ditto and Reflect. Seems to me we’re all running around the same Mulberry bush.
On a current project I’m faced with the following scenario - client builds property developments which are split into categories like "residential, office, retail etc". So for the sake of retaining friendly alias and path names I’ve setup a tier as follows:
ROOT
» Developments
» Retail
» Dev Name
» Dev Name
» Residential
» Dev Name
» Dev Name
Nothing too tricky I know, HOWEVER, projects are split according to their status: current developments and past developments.
So in the navigation column you have structure like this:
» Current Developments (submenu shows two tiered output of "developments" tagged as "current")
» Category (linked to list page with only "current" dev’s in cat)
» Dev Name
» Dev Name
» Category
» Dev Name
» Dev Name
» Past Developments (submenu shows single tier output of "developments" children containing children tagged as "past")
» Category
» Category
Bit of a conundrum for me I must say... Wayfinder handles tiers but won’t filter based on a tv so not even multiple wayfinder calls will achieve what I’d like. Ditto on the other hand can handle the filtering but can’t output the various tiers so it’s a case of hand-coding ul and li tiers and placing embedded Ditto calls with a custom snippet to check if the current doc id matches the tier/item to mark a link as active. Now before you call me a Noob and tell me to get a life, take a look at
www.swellguys.co.za - it’s a pretty decent showcase for MODX.
Perhaps someone can help me solve this, but I do strongly feel that combining Ditto and Wayfinder into a single snippet (DisWay, DittoFinder, WayToDitto) will be extremely beneficial to the MODX community at large.
I look forward to your responses, Marschant