We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    Good point. OTOH, it would take a fair amount of parsing to make either snippet handle multiple complex elseif conditions (which wouldn't be needed very often), so it would slow things down for the simpler cases.

    BTW, since tags are processed from the inside out, it's theoretically possible to combine the two snippets using the If snippet to provide the cases for the Switch snippet. That should allow handling of any possible set of conditions, though it wouldn't be very efficient.


    ---------------------------------------------------------------------------------------------------------------
    PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
    MODx info for everyone: http://bobsguides.com/modx.html
      Did I help you? Buy me a beer
      Get my Book: MODX:The Official Guide
      MODX info for everyone: http://bobsguides.com/modx.html
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting
      • 38590
      • 22 Posts
      You are right about the complexity. They say "Don't fix it if there's no problem" smiley