How can I make the user page only show the tab for "Account settings" (user/%uid/edit) but no tab for editing the content profile, yet editing the content profile still should be accessible by the path (user/%uid/edit/name-of-content-profile-type)? I tried the following:
- In /admin/content/node-type/name-of-content-profile-type/profile under "Profile edit tab:" I selected "None", but then the edit form is not available at all.
- In /admin/content/node-type/name-of-content-profile-type/profile under "Profile edit tab:" I selected "Show a secondary tab below the user's edit tab", and then I used hook_menu_alter()
to set $items['user/%user/edit']['type'] = MENU_CALLBACK;
and $items['user/%user/edit/name-of-content-profile-type']['type'] = MENU_CALLBACK;
getting a "You are not authorized to access this page" error.
- - In /admin/content/node-type/name-of-content-profile-type/profile under "Profile edit tab:" I selected "Show a secondary tab below the user's edit tab", and then I used hook_preprocess_page()
to remove the two tabs from being displayed, but this makes the user/%user/edit/name-of-content-profile-type show up as a primary tab in the user profile.
So how can I let the user/%user/edit/name-of-content-profile-type have accessible silently but not showing any tab/menu entry (I want to link to it directly)?
Comments
Comment #1
jaochoo CreditAttribution: jaochoo commentedI tried to choose "Show a tab at the user's page" and it does not seem to work at all. Even with "weight" set to -10 it does not display any tab.
Comment #2
jaochoo CreditAttribution: jaochoo commentedOkay, now I was able to set it to "None" and can link to
user/%user/profile/$content_profile_type
where the edit form is. But using it that way I am loosing the tab-bar with all the other user profile tabs. Is that possible?Comment #3
baff CreditAttribution: baff commentedsubscribe: I would like to show the tab ONLY if a content profile node is ALREADY CREATED