Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
By Askilus on
Hi,
How do I turn of the entire navigation block for users that are not logged in? I only want this box to be visible for users who is logged in. I know that I can turn it of in administer->blocks but that also affect the logged in users, I dont want that.
(Ps. Tried to search the forum but didn't found what I was looking for).
Thanks!
Fredrik
Comments
Possible solution
That's easy. It takes just two steps:
* You disable the Navigation block in administer->blocks by setting Active to Off and Custom to On. This means that by default, the block will not be displayed, but for registered users the setting can be override.
* You edit for "each user" the blocks each one wants to be visible. You'll notice that for the user the Navigation block will be off by default, but after you enabled it and click on Save button, than that user will see the block.
The question here is: there is a way to set it globally, instead on a per-user basis? I don't know.
Disabled by default?
If I need to configure this for each user thats not an option. If it is possible to make it enabled by default for registred users (ie by having the checkbox in the users profiled checked by default) that would be an option.
The thing is that its one single module that's messing with me. The Feedback module creates a link in the navigation box. I already have a link for this page in my top-menu and don't want it there (since this then is the only link in the navigation block for non registred users). I tried a real ugly thing and commented out the function creating the link in feedback.module but that only resulted in an empty navigation block and that is of course even ugglier.
Thanks,
Fredrik
Did you find a solution?
I have the same problem with the event module...
(at http://www.grasjas.be)
DiscoFreq
http://filters.muziq.be
We should extend the block
We should extend the block configuration page for that, much like we added a 'page type check' in Drupal 4.6. This would be highly commit-able (core worthy).
I agree
I'm also for this!
edit the code or menu
to make a block disapper when not logged in, turn off the offending items that appear when not logged in via Administer | Menus. Before 4.5 you could tweak the code but with menus this was no longer necessary.
if no items within the block are set to appear, then the block itself won't appear either.
View blocks by roles
You can consider this patch View blocks by roles
Don't hesitate to send feedback ;)
I accidently deactivated
I accidently deactivated navigation entirely and can no longer see admin options. How can I reactivate?
_________________
http://NRGtek.net
_________________
Try this link
This link will take you to the blocks menu to switch it back on.
http://yourdomain/?q=admin/block
or this one will take you to menu page
http://yourdomain/?q=admin/menu
gpdinoz
"If we can see further it is because we stand on the shoulders of giants"
Regards
Geoff
Type URL
Just type
/admin/block
next to your drupal URL and you get it back.edit : Beaten ;)
Create Custom Block and disable "Navigation"
To solve the the problem of the original post.
Create a Custom Block with the following code and your Navigation Block will only be displayed for users that are logged in.
Then disable the original Navigation Block
gpdinoz
"If we can see further it is because we stand on the shoulders of giants"
Regards
Geoff
Old post but helped
Thanks.