Add login / logout to drupal menu that's not a primary or secondary menu

Posted by user367766 on Stack Overflow See other posts from Stack Overflow or by user367766
Published on 2010-06-15T22:59:57Z Indexed on 2010/06/16 0:12 UTC
Read the original article Hit count: 504

Filed under:
|
|
|
|

Hello, Im trying to append an item to a menu that I created.

I know its get the primary and secondary menus using "menu_secondary_local_tasks()" etc, and then add items within preprocess page. How would I go about this with a menu that I created?

Here is the code I am using to check is the user is logged in...

function themeName_check_login() {
    global $user;
    if ($user->uid) {   
        print l("Log out, " . $user->name,"logout");
    } else {
        print l("Log In ","user");
    }   
}

Thanks in advance, -Matt

© Stack Overflow or respective owner

Related posts about drupal

Related posts about login