Nov 29 2006

Drupal Menu Creation: Preventing Parent Items from Showing

Categories:


Drupal Menu Creation: Restricting Parent Items

If you've installed a Drupal site for a client you may have encountered this issue - say a content manager can only access certain items - when they create a page and select its menu, shouldn't the menu also reflect only the content that is accessible to them?

Defining Viewable Menus

The menu page itself contains a giant pile of information, much of it linking content that will not be accessible to a lower-level content manager. Therefore, when that content manager creates a page and links a menu item to it (using the drop-down box), they are most likely not going to want to have to scroll down through all of the "navigation" links (nor should they see the ones they haven't been given access to).

The Key: Menu Settings

The key lies simply in accessing the menu settings (under administer -> settings -> menu). From here you'll be able to define which menus are linked to the "primary" and "secondary" links (in other words, they don't necessarily need to be named "primary" and "secondary" links - you can make up your own menus and link them here. Next, under "post authoring form settings" there is a drop-down entitled "restrict parent items to:" This is exactly what we're looking for - you can use this to say, restrict parent items to primary links only - this way they 1) won't have to scroll through all the navigation links to get to primary links when creating a menu item for a node, and 2) they won't see menu items they don't have access to. Voila Smiling Please post any questions or comments below.

Average: 5 (1 vote)

Select your preferred way to display the comments and click "Save settings" to activate your changes.

This isn't right

I don't understand. You mean admin/build/menu/settings? if so this appears to be a global setting not just for a specific editor.

Drupal Menus: 5.x

This article was referring to Drupal 4.7.x. For Drupal 5.x, browse to Site Building -> Menus -> Settings. From there, select "primary links" (or a menu you created yourself) from the "Menu containing primary links" drop-down. I think the menu selection defaults to "Navigation" (or at least it used to), which provides additional links that are confusing to users that shouldn't be seeing these links.

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Textual smileys will be replaced with graphical ones.

More information about formatting options

Captcha
This question is used to make sure you are a human visitor and to prevent spam submissions.
Copy the characters (respecting upper/lower case) from the image.