We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3022
    • 59 Posts
    Dear all,

    yesterday I tried making a menu item, and I discoverd that I couldn’t use more than 30 characters (the input field in the Manager doesn’t allow that).

    Is there a way to use more than 30 characters?

    (Please don’t ask why I want more than 30 characters in the Menu Item... wink )


    TIA,


    Bee
    • Unfortunately, the current database structure is limited to 30 characters. I’d suggest using a different field if you need longer link text to appear, such as pagetitle or longtitle to accomplish this.

      If you are using the DropMenu snippet to generate your menu, you can easily accomplish this by calling the snippet with a parameter of &textOfLinks=`pagetitle` or &textOfLinks=`longtitle`, as in:
      [!DropMenu? &textOfLinks=`pagetitle`!]
        • 3022
        • 59 Posts
        Jason,

        thanks for the confirmation of the limitation of 30 characters.

        I just discovered that by leaving the "Menu Title" field blank for a page, DropMenu automatically takes the page title as menu title, and that can be longer than 30 characters.

        This partly solves my problem. Yes, I can use menu title longer than 30 characters, however it is now linked to the page title.

        Oh well...

        Thanks again!


        Bee
        • Bee, actually that’s a good one for the bugtracker as a feature request for the next rev... lots of changes and I ran into the same exact thing recently!
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 3022
            • 59 Posts
            Quote from: rthrash at Jan 26, 2006, 01:55 PM

            Bee, actually that’s a good one for the bugtracker as a feature request for the next rev... lots of changes and I ran into the same exact thing recently!

            Hi Ryan,

            good point! I just filed the feature request:
            http://modxcms.com/bugs/task/238


            Bee
              • 29635
              • 361 Posts
              Hi all.
              It says in the bugtracker that this has been added to 0.9.2, but I’m still limited to 30 characters (tried on a few different installs too, all 0.9.2.1).

              Is it working for anybody else?
                Need MODx Ecommerce? Try FoxyCart!
              • It says in the bugtracker that this has been added to 0.9.2, but I’m still limited to 30 characters (tried on a few different installs too, all 0.9.2.1).

                Is it working for anybody else?
                Having checked what was committed for 0.9.2 (and 0.9.2.1) I think the problem here is that 0.9.2 became an interim security release and doesn’t include the full range of additions which were destined for what is now to be 0.9.5. (Just that some of the items in the bugtracker were assigned to 0.9.2 before it was decided that it would only be a security release - hope that makes sense!)

                It’s easy enough to change using phpMyAdmin or equivalent if you need it urgently:

                1. Change the max size of the menutitle field in the site_content table
                2. Change the maxlength of the menutitle input field to match what you’ve set in step 1 in manager/actions/dynamic/mutate_content.dynamic.action.php

                (For future-proofing it may be worth setting it to the value destined in 0.9.5, which will be 100 characters)

                  Garry Nutting
                  Senior Developer
                  MODX, LLC

                  Email: [email protected]
                  Twitter: @garryn
                  Web: modx.com
                  • 29635
                  • 361 Posts
                  Thanks Garry, that makes sense.

                  In case anybody else stumbles on this and wants to hack it on their own:
                  You need to change that field in the DB as Garry mentioned, and you also need to cange the maxlength="30" on line 590 in /manager/actions/dynamic/mutate_content.dynamic.action.php

                  Thanks again Garry for pointing me in the right direction.

                  It feels so good to finally be able to use something like
                  <i>2.</i> Rates &amp; Calculators
                  in a menu title.
                    Need MODx Ecommerce? Try FoxyCart!