We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18436
    • 135 Posts
    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
    • Adding TV support to Wayfinder would be very cool indeed. The danger you run into with making one snippet to rule them all is bloat. An analogy: it’d be very difficult to make a vehicle that could do optimally well in a Formula One race, the Paris to Dakkar 1000, the World Cup (sailing) and an Enduro Motocross.

      For small sites and with the right caching it’d probably work great. Start to scale and you’d likely start running into problems, or wind up with a lot of extra wasted resources.

      It might be interesting to see a series of chainable data collectors, filters and output engines:

      Collect data from: document map, custom database table, flat CSV file ...

      Filter by: document meta data, TVs, data columns, max records, data hierarchy, random selections, weighted random

      Transform some or all result "fields": truncate, PHx, output filters, summarization

      Display through: MODx template, paging, Smarty Template, ExtJS grid ...
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me