Hi,

I'm setting up a community site where the public should see one menu and registered users another.

How do I configure that?

Thanks

Comments

seanenroute’s picture

First Create your menus if you haven't already
1. Go to Menus in the Admin section
2. Click Add New Menu
3. Create Menu, add Menu Items
4. Repeat for 2nd menu

Then go to Blocks
1. Click "Configure" for your authenticated user block
2. Find "Page Specific Visibility Settings"
3. Select "Show if the following PHP code returns TRUE (PHP-mode, experts only)."
4. Insert this code:

<?php
global $user;
if($user->uid > 0) return FALSE;
else return TRUE;
?>

To make a menu visable only to guest viewers and not authenticated users the code is:

<?php
global $user;
if($user->uid > 0) return TRUE;
else return FALSE;
?>

I hope this helps...

tholap’s picture

Exactly what I needed - thanks very much for the quick answer.

cheers

p.s. the two scriptlets are swapped. :-)

toma’s picture

Thanks good tip

---
Daily webmaster news and directory (digg style)
http://www.dwebmaster.com