ModxAs a rule I always attempt to go with the Wayfinder snippet first when developing site navigation. It allows you to quickly create unordered lists and is the appropriate choice for site navigation in most instances.

One of the drawbacks of using Wayfinder is that it’s not always easy to customize the output. I have found, from time to time, that I fall back to Ditto to create more customized output that my sites may require. It is worth noting that there are performance trade-offs with using Ditto for navigation, so use it judiciously.

The Problem

For someone new to Ditto they may not realize that you can create output driven from alternating TPLs. In my example I had created dropdown navigation for a large healthcare site. My problem was that one of my containers had a large number of child documents which were creating a dropdown menu that was too long.

The Solution

In order to address this issue I used Ditto to create output that alternated how the lines of navigation were ouput (see below). By floating these alternating links left and right with my CSS I was able to create two columns within a single dropdown which created a menu that was basically half the length of my original.

[!Ditto? &id=`dropdown1` &startID=`1` &orderBy=`pagetitle ASC` &tpl=`leftNavigationTPL` &tplAlt=`rightNavigationTPL`!]
  • http://www.air-jordan-6.com air jordan 6

    “Well , the coach outlet view of coach handbags the passage is totally correct ,your details is really reasonable and you guy give us valuable informative post, I totally agree the standpoint of upstairs. I often surfing on this forum when I m free and I find there are so much good information we can learn in this forum!
    winter boots