By richardhall on
Because all the functionality is locked down to user account holders on one site, I don't want to provide the navigation block as each link then just leads to an access denied page. How can I make the navigation block only available to logged in users?
Comments
Access Content
Try unchecking Access Content for anonymous users in your access settings. It's under Node Module. That should keep them from seeing anything before they log in.
Try this:
Try this: http://drupal.org/node/17272
Uwe.
--
hermann-uwe.de | crazy-hacks.org | unmaintained-free-software.org
No thats not what I'm looking for..
Erm no, whilst I wan't the navigation menu to be invisible I still want all the pages to be shown to anonymous users. The navigation menu should only show if a user is logged in..
I've basically rigged it now to do what I want but its not an ideal solution.
http://drupal.org/node/13266.
Uwe.
--
hermann-uwe.de | crazy-hacks.org | unmaintained-free-software.org
use php script in your page.tpl.php
Just use a php script in your theme i;e page.tpl.php
global $user;if ($user->uid) :Your navigation block here
endif;this script checks whether a user logged in or not iflogged in it returns the navigation block. if not logged in returns nothing.
Sunny
www.gleez.com
Try this it's working
Not: I have admin role so i defined ADMIN there.
Creat a custom block and put the above code in it and select php as the input format and save.
just check it for other examples
http://drupal.org/node/13266
Sunny
www.gleez.com
Disable the navigation block, but keep personalization?
Like many others, I too want to suppress the navigation block for anonymous users. However, while many of the custom block solutions recommended here and other threads work to a degree - there's a couple of undesirable side effects:
1) For all of the custom block solutions, the anonymous user will still see the "block header" without the content.
2) For logged in users, it seems the various solutions lose the "personalization" of the block changing the header/block title to the username...
Anyone have a 4.6.x solution that makes the block totally disappear for anonymous users AND showing the "personalized" menu for logged in users?
Radi
Does any of code examples here not block at all -in full with?
Does any of code examples here not present any block at all if user not logged in.. _ as content is full with instead of an empty space of blocks area on the theme
current options on User specific block visibility settings does not provide this
Custom visibility settings:
- Users cannot control whether or not they see this block.
- Show this block by default, but let individual users hide it.
- Hide this block by default but let individual users show it.
- Allow individual users to customize the visibility of this block in their account settings.
If you are using PHPtemplate
Add this to function to your template.php file and replace YOUR_THEME with your theme name: