By achieve-it on
Hi,
i've found a couple of links on how to accomplish this on drupal 4 and 5, but i have no clue how to do it in Drupal 6.
I don't want a seperate (custom) log in block. I want in my default navigation block a log in or a log out link depending on wether the user is logged on or not. So the main question is how to run php code (an IF statement) within the default navigation block.
any help would be appreciated.
Yves
Comments
Nav menu or the block housing the Nav menu?
The nav menu should have a link for log out, and login is as simple as adding a new link via path = "user/login", title="Login"
Custom code for the block would be:
Alan Davison
www.caignwebs.com.au
Alan Davison
Alan, if i add "Log in" in
Alan,
if i add "Log in" in the nav menu it keeps giving the link Log In even if i am logged on. I then receive something like this when i'm logged on.
item 1
item 2
item 3
Log In
Log out
so i guess i want to know how i can add php code to the block that houses the navigation.
Yves
What version of D6?
This does not work in D5, for which there is a custom module. http://drupal.org/project/loginmenu
This would be a menu issue if it doesn't work on your version.
There are many examples of blocks floating around, alt. you can embed the code directly into the theme.
Alan Davison
www.caignwebs.com.au
Alan Davison
I've tried this in my test
I've tried this in my test installation of D6.2, and it works like a charm. Menu entries pointing to registration (user/register) and password reminder (user/password) also only show up when not being logged in.
Hi , create a new menu item
Hi ,
create a new menu item pointing to (not to ) http://www.--website--.net/drp/?q=logout
That all :-)
Have Fun