By genDisarray on
I am looking to change the default navigation menu, the one that expands when you click on 'Administer'. Basically I do not want it to expand when you click on the main links. So::
I DO NO WANT
My Account
Create Content
- Page
- Story
Administer
Logout
I WOULD RATHER HAVE IT
My Account
Create Content
Administer
Logout
I cant figure out how to override this, if you set the menu items to disabled, it does remove them from the expanding tree, however it also removes them from the website entirely. Not good. I have written some php that does what I need, but it is extremely crude and I would rather find a more official way of doing this.
Thanks.
Comments
=-=
edit the children menu items and disable them.
I already stated that for
I already stated that for some reason, when you disable the children, such as "Content Management" under Administer, it also removes it from the actual site. Thats no good.
=-=
ah, you're right I glazed right over that. That must mean I've not had enough coffee.
Disable the create content menu item, leaving the children enabled
create a new create content menu item with no children pointing to node/add
^ untested
This could work, but how
This could work, but how would I link to 'My Account' since it is based on the user. And I certainly dont want Administer to show up for people who dont have access.
In short I am looking for a way to override however this menu is generating, in hopes of preventing it from displaying the children items. If it is not possible that is fine, I will grab the code I already have and try to make it better.
In fact, Ill show it here:
This code works nearly perfectly, I only run into trouble because I want the links highlighted when you are on on of those pages. However, the code is what most people refer to as "Kluge", and am seeking help to fix that.
=-=
in my example, you wouldn't be touching myaccount or administer thus those would still work as they already do.
You'r removing the default create content menu item and adding a custom create content menu item into the same menu.
my account is handled dynamically with a menu item that points to the user path. Drupal knows what user based on the uid of the logged in user.
administer menu item doesn't show up for non administrative users.
If it doesnt disable the
If it doesnt disable the create content ability of the site, thats fine. But I still dont want administer to expand. I think I will just work on the code I have. Thanks though.
=-=
you can do the same thing with admister as far as I know. Disable the parent leaving the children enabled
create a new administer menu item. Though with regards to administer you can just disable the children as that doesn't go to a page like create content does, it goes to the administration dashboard more less.
menu items users don't have access to may not show to those users. beyond that you can use menu_access.module to control access to menu items
I dont want it to expand. I
I dont want it to expand. I only want:
My Blog
My Account
Create Content
Administer
Logout
No matter what I click on, I dont want my website's height increased because of an expanding tree.
=-=
I was editing, please reread.
you can also disable the navigation menu and create you own, which automagically creates a new block which you can then enable to be your naviagtion menu exactly the way you want it without code.
Yep, that seems to have
Yep, that seems to have worked, only disabling the parent item and creating a new one.
Thanks a bunch!