We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1331
    • 129 Posts
    I absolutely need a way to remove the feature in the Manager UI that blocks the save button. There are several things that you can do when editing a page that don’t immediately enable the save button. To get it to activate, you have to go add a space somewhere or something else just so you can save. I have a client that I’m handing off to and I don’t want to have to tell them that this is what they have to do.

    Also, I’m looking for a way to sync Pagetitle and Menutitle on first save ONLY. I want it to automatically populate the menutitle with the pagetitle contents, but allow you to edit once it’s there.

    Any idea how either of things will be possible?
      • 29964
      • 2 Posts
      If you edit something and then click somewhere else on the page it registers it so then you can save.
        • 3749
        • 24,544 Posts
        Quote from: abelafonte at May 27, 2011, 03:29 PM

        Also, I’m looking for a way to sync Pagetitle and Menutitle on first save ONLY. I want it to automatically populate the menutitle with the pagetitle contents, but allow you to edit once it’s there.

        You would need a plugin tied to OnBeforeDocFormSave. Something like this:

        <?php
        if ($mode = modSystemEvent::MODE_NEW) { /* ignore existing docs */
            $resource->set('menutitle', $resource->get('pagetitle'));
        }
        

        If you want to leave menutitles entered by the user, do this instead:

        <?php
        if ($mode = modSystemEvent::MODE_NEW) { /* ignore existing docs */
            if (empty($resource->get('menutitle')) {
                $resource->set('menutitle', $resource->get('pagetitle'));
            }
        }




          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