By kobnim on
I have a page that displays a particular form. If the user is not logged in, I also display the user registration form at the top of the page:
if (!$user->uid){
$output .= drupal_get_form("user_register");
}
$output .= drupal_get_form("my_form");
What I would like to do, however, is display the login / create account / retrieve password tabs at the top of the page, if the user is not logged in:
if (!$user->uid){
$output .= ???; // display the login/create account/retrieve password tabs.
}
$output .= drupal_get_form("my_form");
Does anyone know how to do this?
Thanks,
Mindy
Comments
Inside the theming files
Inside the theming files page-whatever.tpl.php there is a variable $tabs, which contains the tabs html, you can decide if to display it or not in this file
displaying tabs without hook_menu
Thanks for the response. My underlying qustion is about hook_menu. If I want to display the login/register tabs as the full page content then I could do something like:
When the user goes to 'my/path', they see both the register and login tab.
But what if I want to display the register and login tabs on just a region of the page, not the full page? Is there a way to specify that I want to display tabs if I cannot use hook_menu? Or is there some sneaky way to use hook_menu to accomplish this?
Thanks very much,
Mindy
anyone?
Anyone know how to do this? Your help would be greatly appreciated. Thanks.