Save $50 on Dreamhost Hosting - Any Plan

As a preferred visitor, you can get $50 off of any Dreamhost hosting plan by using coupon code CWD50 when you check out, for a limited time. Dreamhost is a reliable hosting provider with solid customer service and a proven track record.

Buy One Domain Name, Get One Free

Looking for a reliable and affordable Domain Name Registrar? Look no further than Dotster. And for a limited time, we're able to offer our visitors a buy one domain name, get one free promotion. Click here to take advantage of this offer.



Nov 29 2006

Drupal Menu Creation: Preventing Parent Items from Showing


Filed under: Content Management Systems » Drupal,
Tools:


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?<?p>

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 (3 votes)
Tools:



Global setting?

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.

Huh?

Your comment doesn't make much sense, but because we're feeling silly we're going to leave it up anyways.

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.

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.

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <br> <br />
  • 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.