Hi guys,
I need your advice here! I tried to do it on my own, but after several days of working I still don't get it. I want to give every user several pages for his/her profile. Therefore I developed the following concept:
1. I set all profile pages as subpages of user/%user.
2. It exists a MENU_DEFAULT_LOCAL_TASK 'Info' which links back to the user main page 'My Account'.
3. All other profile pages of an user will be subordered to user/%user, e.g. user/%user/info or user/%user/publications.
4. Further, all subpages of the user (like user/%user/info etc.) should have MENU_LOCAL_TASKs 'View' and 'Edit', as we have it in the Drupal basic version (with garland as chosen theme).
The second point has been created successfully, without further problems (here, one must make sure, that the 'type' is MENU_DEFAULT_LOCAL_TASK and not simply MENU_LOCAL_TASK, otherwise linking does not work). Also, the third point seems to be no big deal when using hook_menu().
The problems arise with the fourth point, namely adding 'View' and 'Edit' as MENU_LOCAL_TASK (e.g. user/%user/publications/view). The tasks are not shown in garland (maybe only one layer of MENU_LOCAL_TASKs is possible).
Especially the 'View' and 'Edit' tasks of the main user page under 'Info' make problems: The callback functions are distributed along the user.pages.inc and user.module files and neither working with hook_menu() nor hook_menu_alter() ended in success.
Any suggestions here would be helpful!
Comments
menu_secondary_local_tasks()
After some further hours without success I have begun to analyze the Garland Theme just to know if the possibility exists to show secondary tasks. The code I found in the template.php file in garland is:
It seems that the secondary tasks (menu_secondary_local_tasks()) have not been implemented yet? Am I right with this assumption? "Overridden to split the secondary tasks", what does this mean? Is this function already overridden to implement secondary tasks or do I have to do it? And if, how do I do so?
I am thankful for any help here!
[quote]Any suggestions here
[quote]Any suggestions here would be helpful![/quote]
First suggestion of asking problems: post your code. People are very rarely psychic.
Contact me to contract me for D7 -> D10/11 migrations.