Closed (fixed)
Project:
Administration menu
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Jan 2009 at 11:58 UTC
Updated:
26 Mar 2011 at 00:12 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sunIf you are using the latest development snapshot, then you can suppress the admin menu by simply calling the function
However, this needs to happen as early as possible in the page request, so
placing it in the theming layer (resp. a page template file) is too late.
Ideally, the function is called in hook_init() in a custom module. If you do
not have a custom module, placing it into some conditional code at the top of
template.php may work out, too.
Comment #2
headkit commentedthank you!
Comment #3
sunComment #4
sunCommitted to all branches.
Comment #6
doublejosh commentedThis link might be useful...
http://drupal.org/node/502408
Hope admin menu is moved from admin_menu_init() into admin_menu_preprocess_page() soon!
Would love to be able to add this my template...
Comment #7
doublejosh commentedAfter hearing Larry's butler talk I wanted to be sure and stop using arg() in modules and this spot is a nasty example.
I was only able to make this work at the init level, and am unsure about what is *best* to test on at that point other than arg().
Is there a later hook where this would be better done? Contexts sure aren't available yet.
Comment #8
baysaa commentedUsing
module_invoke('admin_menu', 'suppress');in hook_preprocess_page in template.php works for me using admin_menu 3.0rc4