My primary issue is to wrap access control to menus by user group. I do this with normal menus using the block code below. I love nicemenu, and would prefer to do the same, however, are the blocks callable in the same way or is this a change to the code?

In an ideal world I'd love to be able to assign individual access control to menu line items, but suspect this is a much deeper issue.

TIA, bullfrog

global $user;
if (in_array('authenticated user',$user->roles)) {
if ($menu = theme_menu_tree('70')) {
$menu = "
". $menu . "
"; } } return $menu;


simon rawson’s picture

Nice menus uses the correct drupal method for building the menus (menu_get_menu()) so the access to the menus is controlled in the same way as drupal itself does. In other words, if a user doesn't have access to a menu item, then it won't appear a nice_menu block.

Hope this answers your question.


bullfrog’s picture


Problem is Drupal doesn't provide access control at the menu item level.

In my case I want to restict menu access to an item (in this case an embedded menalto gallery) to guest users. Given that guest users have access to a small number of pictures in the gallery so that I can display their thumbs, it means the gallery menu item shows up.

Best flexibility, and as provided in most CMS's, means access control can be assigned at such a granular level. If it can't be done in base Drupal, then would be highly desirable in a module such as nicemenus. I know from the forums and comments I've got from other Drupal users that this is not an issue unique to me.

So, very nicely with cheese on top, could it be considered for an enhancement to the module?

cosmicdreams’s picture

I concur, in my case I am using control panel to manage both the administrative section of drupal and the create content subset of menuitems. When I give access to the control panel module to allow users to create content, the Administration menu item will exist for non-administrative users (even though when they click on the administration menu, they aren't allowed to view administrative options). I can't see a way around this.

I second the motion for this new feature.

add1sun’s picture

Status: Active » Closed (won't fix)

clearing old issues - 4.6 is deprecated