By nagalv on
I would like to add more primary tabs & remove existing tabs. For Example in user/register path, Create new account, Login, Change password tabs are available by default.
How to do this?
I would like to add more primary tabs & remove existing tabs. For Example in user/register path, Create new account, Login, Change password tabs are available by default.
How to do this?
Comments
If I understand you
If I understand you correctly, you can try going to site building, menus (admin/build/menu) and add or remove items from the primary links menu.
----------------------------------------------------------------------
http://www.bwv810.com/
I am a writer and researcher. In my spare time I build websites with Drupal.
Je peux communiquer en français. / Я могу общаться на русском языке.
Thank you for your
Thank you for your information.
I could able to add & remove the primary links which are displaying in the navigation bar. Actually I want to know how to add & remove the primary tabs. Primary tabs means, the menu tabs are displaying after the content title. For Example, in user registration page the primary tabs are Create New Account, Login & Forget Password. How to add and remove those primary tabs?
...
It's better to say "tabs," or "menu tabs." When you say "primary tabs" people might think you're refering to the "primary links."
You can't add a tab using the menu administration page alone. That's because tab items have a special 'flag' that marks them as such. You need a module to do this. Either write one or use a ready-made.
For example, the Views module. This module is used to build lists of nodes, but it can show individual nodes too. It can create a menu item for the view --and flag it as a tab, too.
What do you want to show in that tab? Where to you want to show it?
--
Help save BLOCKQUOTE
Thanks for your more
Thanks for your more information.
I want to use menu tabs in user registration page. By default, in user registration page Crete new account, Log in & forget Password tabs are displaying. Instead of those tabs I want to display My Account, My Interests, My Affiliations, My Images etc...
...
You want to put these tabs on the user account page (q=user/123). Not on the "user registration page", because on that page there's no user yet --so there's no "my" either.
But the tabs are secondary. The more important thing is the content. If you don't have a content, there's nothing to put in tabs.
- Some modules do all the work for you. For example, there are image hangling modules that put a tab on the user page (don't ask me for names; I don't know them all. Better open a separate thread).
- Or you can use Views to create tabs that list some content.
- And if you have special requirements you can write your own module.
How to add & remove tabs from user registration form ?
I also want to know about this .
You create a menu item under
You create a menu item under /user/ and give it a type of MENU_LOCAL_TASK:
Sincet he path is user/my_interests, and the type is MENU_LOCAL_TASK, this will show up as a tab on the user page.
Contact me to contract me for D7 -> D10/11 migrations.
Thanks for reply
Thanks for reply,i have created menu item as per your reply but it is not working.
Any other suggestions.
Other suggestions? No, the
Other suggestions? No, the above is the only way to do it. Did you create a module, put it in the module, and enable the module?
Contact me to contract me for D7 -> D10/11 migrations.
Corrected <?phpfunction
Corrected
Hello, Thanks for the info
Hello,
Thanks for the info above. I tried to edit my tabs using the following script:
function customsite_menu()
{
$menu['user/%/edit'] = array (
'title' => 'Edit menu',
'type' => MENU_LOCAL_TASK,
'description ' => 'edit my account details',
'page callback' => 'page_display',
// this should be the name of the function that you want to be executed in order to display the page
//type, description etc
'access callback' => 'user_access',
'access arguments' => array('my_permission'),
);
return $menu;
}
The result is a bunch of error messages when I get back to my admin page, as follows:
* warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'page_display' was given in /home/lateguid/public_html/includes/menu.inc on line 348.
* warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'page_display' was given in /home/lateguid/public_html/includes/menu.inc on line 348.
* warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'page_display' was given in /home/lateguid/public_html/includes/menu.inc on line 348.
* warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'page_display' was given in /home/lateguid/public_html/includes/menu.inc on line 348.
* warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'page_display' was given in /home/lateguid/public_html/includes/menu.inc on line 348.
* One or more problems were detected with your Drupal installation. Check the status report for more information.
Any help would be more than appreciated.
Thanks,
T.
You have to create a function
You have to create a function called 'page_display'. You are telling the system that that function exists in your function, but the system isn't finding it.
Contact me to contract me for D7 -> D10/11 migrations.