This could allow administrators define paths where they don't want to see the menu.

Comments

sun’s picture

Status: Active » Postponed (maintainer needs more info)

Why, when, and how would this be useful or required?

Note that you can suppress admin_menu via code already. Many modules do that (on certain pages) already.

sun’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Sorry, without further information this issue can only be marked as won't fix.

Feel free to re-open this issue if you want to provide further information. Thanks.

sansui’s picture

Status: Closed (won't fix) » Active

Just saw this thread :)

Thought I would add a scenario I have encountered. I have a custom node template for a content type, along with a custom edit version of that content type. For viewing, all page related layout/navigation is removed so that the node can be displayed simply in a lightbox, while retaining node access information

I found the suppress code for admin menu, but looks like it doesn't work with preprocess... have to make a custom module for it?

sansui’s picture

If anyone else is looking for this, here was the solution I ended up with to suppress the admin menu just on the view portion of my video nodes. I added a tiny custom module, and used this function:

function my_video_menu_init() {
$node = menu_get_object();
if ((!empty($node) && $node->type == 'video') && (arg(2) != 'edit')) {
module_invoke('admin_menu', 'suppress');
}
}

sun’s picture

Status: Active » Closed (won't fix)

That's a fairly special use-case, for which you likely had to do countless of other tweaks. Hence, nothing that applies to all users of this module.

Note that admin_menu won't render for anything else than pages in D7 already, so this is basically fixed already.

sillygwailo’s picture

StatusFileSize
new4.41 KB

A patch that adds this feature against 6.x-3.x-dev is attached.

#825150: Add page specific settings for "Keep menu at top of page" is a similar issue (with similar code, but I worked on this independently) though not quite the same.

maddentim’s picture

I am using the lightbox2 module to render a node add page in an iframe. I would like to suppress the admin menu from rendering inside this iframe. By creating separate page-node-add-contenttype.tpl.php + some targeted css, I can eliminate the rest of the page elements that I do not need, but the admin menu not so much.

I saw the admin_suppress function, but you are supposed to call from a module and lightbox2 doesn't seem to be calling it. I use features so I have a module that I can easily call it from.

-- edit --
I posted this in admin_menu when the module I have is the derivative admin... sorry about that.