Jump to content

Trying to enter some code for header links (login, logout...)


werushka

Recommended Posts

I have the following code and it works fine in page.tpl.php

<?php
global $user;
if ($user->uid) {
    print t('<b>Hello !name', array('!name' => theme('username', $user))) .'</b> | '. l(t('Log out'), 'logout');
}
else {
    print t('<b></b> ' . l("Log in", "user/login", array(), drupal_get_destination()) . ' </b> | </b>' . l("Register", "user/register") . '');
}
?> 

 

If the user is logged in it prints as

 

Hello Jack(as link to user profile page) | Logout (as link to logout)

 

but I would like to configure that it shows like below

 

Hello Jack (not a link, and bold font format) | My Profile (as link) | Buddy List (link is /buddylist) | Log Out (as link to logout)

 

I would really appreciate some feedback to accomplish this ...

 

Thanks for your time.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.