We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34108
    • 66 Posts
    Hi MODxers smiley I have the following code in my ManagerManager rules (mm_rules) which is designed to hide all the specified fields from the client, but show them for the admin (myself). For some reason though it’s not recognising the "don’t apply this rule to the admin" command (’!1’) because it’s hiding all these fields from me as well.

    Am I doing something wrong or is there an error in my code?? Any help would be very much appreciated.

    $list_tpl = '8';
    mm_hideFields('show_in_menu,introtext,link_attributes,content,pagetitle,description,alias,longtitle,template,menuindex,parent,settings', '', $list_tpl, '!1');
    mm_hideTabs('settings', '', $list_tpl, '!1');


    Thank you!

    Harmony
      • 34108
      • 66 Posts
      Anyone able to help with this one pretty please grin ??
        • 21056
        • 327 Posts
        You don’t seem to have your parameters in the right order -- roles always come before templates, and you have the wrong number of paramaters for both. It should be:

        $list_tpl = '8';
        mm_hideFields('show_in_menu,introtext,link_attributes,content,pagetitle,description,alias,longtitle,template,menuindex,parent,settings', '!1', $list_tpl);
        mm_hideTabs('settings', '!1', $list_tpl);
          Author: ManagerManager plugin - customise your ModX manager interface

          Rckt - web development, Sheffield, UK
          • 34108
          • 66 Posts
          This new code did the trick. Thanks for your help again ncrossland, much appreciated!