On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • While I was reading the DropMenu snippet documentation, I noticed a small flaw in the &textOfLinks part.

    Currently it says:

    What database field do you want the actual link text to be? The default is pagetitle because it is always a valid (not empty) value, but if you prefer it can be any of the following: menutitle, id, pagetitle, description, parent, alias, longtitle, introtext. TO DO: set text to be first non-empty of an array of options. Defaults to ’menutitle’.

    If you take a look at the underlined text you can see that this part has two default states smiley. I assume the default should be menutitle, but you might want to correct this in the docs.
      These bytes are 100% useless smiley
    • Well, actually it’s just badly written...it tries to default to menutitle, but if that is empty it will use pagetitle.

      // if menutitle is blank fall back to pagetitle for menu link
      $textOfLinks = (empty($child['menutitle'])) ? 'pagetitle' : "$textOfLinks"; 
      
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
      • My mistake then, thanks for clearing it up!
          These bytes are 100% useless smiley
        • No, it was good that you brought it to my attention. I’ll see what I can do to clarify the issue.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
          • I was just noticing that this is still uncorrected and thought it would be good to post a reminder... wink
              Rafael