Manager Customization: Hide Top Menu Items with a Custom Permission

Create custom permissions and control which menu items are visible to your User Groups to improve Manager UX and Security.

By Bob Ray  |  Updated: December 28, 2021  |  4 min read
Manager Customization: Hide Top Menu Items with a Custom Permission

This is the second article in a three-part series on MODX Manager customization (click here for the first and here for the final). There are a variety of reasons to customize the back-end Manager UI for your users or groups. These include making frequently used items more accessible, preventing access to things that could cause problems, protecting confidential data, or removing things they should never see in the first place.


In the previous article, we looked at how to hide MODX Manager menu items from specific users using an existing permission. In this one, we’ll create a custom permission that will let us easily hide any menu item from any user group. It takes a little work, but it only has to be done once, and hiding menu items will be very easy once you’re finished.

Create the Policy Template

  1. Go to System (gear icon) → Access Control Lists.
  2. Click on the “Policy Templates” tab.
  3. Click on the “Create Policy Template” button.
  4. Put HiddenMenus in the “Name” field.
  5. Select Admin on the Template Group dropdown.
  6. Put See hidden menu items in the Description field.
  7. Click on the “Save” button.

Add the Custom Permission to the Template

  1. Click on the “Policy Templates” tab.
  2. Right-click on the “HiddenMenus” Template.
  3. Select “Update Policy Template”.
  4. Click on the “Add Permission to Template” button.
  5. Put hidden_menus in the “Name” field.
  6. Put See hidden menus in the “Description” field.
  7. Click on the “Add” button.
  8. Important! Click on the “Save” button at the upper right.
  9. Click on the “Close” button.

Create the Policy

  1. Click on the “Access Policies” tab.
  2. Click on the “Create Access Policy” button.
  3. Put HiddenMenus in the Name field.
  4. Select the “HiddenMenus” Policy in the Policy Template dropdown.
  5. Put See hidden menu items in the Description field.
  6. Click on the “Save” button.

Enable the hidden_menus Permission

  1. On the Access Policy tab, right-click on the “HiddenMenus” policy.
  2. Check the “enabled” checkbox for the “hidden_menus” permission.
  3. Click on the “Save” button at the upper right.
  4. Click on the “Close” button.

Create the User Group

  1. Click on the “User Groups & Users” tab.
  2. Click on the “New User Group” button.
  3. Put HiddenMenus in the "Name” field.
  4. Put See hidden menu items in the Description field.
  5. Add your username, and those of any other users who will never have menu items hidden from them in the “Users” field.
  6. Put mgr in the Contexts field.
  7. Put HiddenMenus in the Resource Groups field.
  8. Select “HiddenMenus” in the Manager Policy dropdown.
  9. Click on the “Save” button.

Make Sure it Worked

  1. On the Manager Top Menu, select Manage → Users.
  2. Right-click on your username and select “Update User”.
  3. Click on the “Access Permissions” tab.
  4. You should see the HiddenUsers user group in the list.

Hiding Menu Items

Before hiding any items, you might want to double-check to make sure the hidden_menus permission is checked on the HiddenPermission policy. Otherwise, you’ll be hiding menu items from yourself:

  1. Go to System (gear icon) → Access Control Lists.
  2. Click on the “Access Policies” tab.
  3. Right-click on the “HiddenMenus” policy and select “Update Policy”.
  4. Make sure there’s a checkmark in the enabled box of the hidden_menus permission.

To hide specific menu items:

  1. Go to System (gear icon) → Menus.
  2. Find the menu item you want to hide (click on menu items with a triangle pointing to the right to expand them if necessary).
  3. Right-click on the menu item you want to hide and select “Update Menu”.
  4. Find the “Permission” field at the bottom.
  5. If it’s empty, enter hidden_menus in the field.
  6. If it’s not empty, enter a ,hidden_menus at the end of the existing permissions.
  7. Click on the “Save” button.

The menu item will now be hidden from anyone who is not in the HiddenMenus user group.

Remember that if you hide a menu item with children under it, you will be hiding the children as well.


Bob Ray is the author of the MODX: The Official Guide and dozens of MODX Extras including QuickEmail, NewsPublisher, SiteCheck, GoRevo, Personalize, EZfaq, MyComponent and many more. His website is Bob’s Guides. It not only includes a plethora of MODX tutorials but there are some really great bread recipes there, as well.