We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36875
    • 5 Posts
    I am creating a weblog page with Ditto. Not finished yet, but getting there. But when users click to add a resource (either in the frontend or in the manager), "show in menu" is checked by default. I do not want all blogposts to show up in the menu. Of course I can tell users they have to uncheck "show in menu" everytime they make a post, but they are bound to forget that and make a mess of things.

    Can I change the default for this anywhere? It would be best if I could change it for blogposts only, but if "show in menu" can be unchecked for all items, that will work too.

      • 16278
      • 928 Posts
      You can use ManagerManager (installed as standard with Evolution 1.0.2) to change defaults, restricting the change to specific templates or roles if required. See documentation in assets/plugins/managermanager/docs/fields.htm
      smiley KP
        • 36875
        • 5 Posts
        Thank you KP! It took some fiddling around but it works beautifully now.
          • 8384
          • 55 Posts
          Thank you again KP52.
          Used this solution and worked great!!

          BUT, after users have created the resource and hit save, the browser just returns a white page with the text that was added in the content field, instead of returning the user back to the original entry page. I’m sure I have to add something in the chunk that ManagerManager calls OR maybe select something on the SystemEvents?, but not sure what.

          This is what I put in the chunk:

          //Changes show in menu default to not show
          mm_default(’hide_menu’, ’ ’, ’ ’, ’19’);


          // Always set the publish date on new documents to the current date and time
          mm_default(’pub_date’);

          :-\
            • 16278
            • 928 Posts
            Does it make a difference if you set a numerical default value, rather than an empty string (or space, as you seem to have)? Also note complementary aliases: hide_menu=1 to hide, or show_in_menu=0, same thing. Try
            mm_default('hide_menu', '1', '', '19');

            smiley KP
              • 8384
              • 55 Posts
              no, that doesn’t work. It still returns to a blank page. Actually, I don’t think it has anything to do with this - but with the QM code to create a new resource. looking into it now! rolleyes
                • 36755
                • 41 Posts
                I tried the proposed codes above, nothing worked. Any ideas what line to add to the ManagerManager to prevent the check in "Show in Menu" for new documents/resources? Thx (modx evo)
                  • 36755
                  • 41 Posts
                  This works (put in the according chunk, check snippet's configuration!):

                  // mm_default($field, $value, $roles, $templates, $eval)
                  mm_default('show_in_menu', false, '1');
                  mm_default('is_richtext', false, '1');
                  mm_default('log', false, '1');


                  doc:
                  http://www.bonefitness.com/assets/plugins/managermanager/docs/fields.htm