Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I configured bio module such that users can edit their bio from their profile page. It now shows up as a "Bio" tab beneath the normal "View - Edit" tabs of the profile.
The problem is:
* In view-mode users see their bio info.
* but clicking on edit brings them to the normal profile settings which is counter-intuitive.
So, I like to change "Edit" to "Edit Settings" and "Bio" to "Edit Bio" to make it easier for users to know where to change which part.
Can you give me a hint where to do that?
Thanks a bunch
Markus
Comments
Comment #1
dldege CreditAttribution: dldege commentedThis can be done in your theme. I had tried doing it by creating my own menu hooks for the various paths involved but that did not work for me. Here is how I did it by overriding theme_menu_item_link in the template.php file for my custom theme ("vanilla"). You can substitute your theme name for vanilla in the following example.
Let me know if this works for you or you need more guidance.
Comment #2
markusH CreditAttribution: markusH commentedhi dldege,
that did the job. excellent :-)
thanx a bunch
markus
Comment #3
markusH CreditAttribution: markusH commentedComment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #5
topwaya CreditAttribution: topwaya commentedI've tried to put this code, substituting my theme name, in my template.php file - but I am using 6.4 - is there a way to make this work with drupal 6.4?
Comment #6
hollybeary CreditAttribution: hollybeary commentedI would also like to change the text on the "edit" tab of user profiles to "edit account information". Been looking all night and can't figure it out, please help!
Comment #7
fehin CreditAttribution: fehin commentedsubscribing
Comment #8
ktonini CreditAttribution: ktonini commentedsub
Comment #9
benone CreditAttribution: benone commentedsubscribe
Comment #10
MikeBC CreditAttribution: MikeBC commenteds u b
Comment #11
vijayitsoft CreditAttribution: vijayitsoft commenteduse this for drupal 6
function YOURTHEME_preprocess_page(&$vars) {
/**
* Tweak wording on Edit tabs.
*/
// Append the Content type's name to the Edit tabs for nodes.
if (arg(0) == 'node' && is_numeric(arg(1))) {
$node = $vars['node'];
$content_type_name = node_get_types('name', $node);
$vars['tabs'] = str_replace('Edit', 'Edit ' . $content_type_name, $vars['tabs']);
}
// Append the word "profile" to the Edit tab on user profile page.
if (arg(0) == 'user' && is_numeric(arg(1))) {
$vars['tabs'] = str_replace('Edit', 'Edit ' . 'profile', $vars['tabs']);
}
} // End phptemplate_preprocess_page function.
This will work!
Merry Christmas and Happy new Year
Comment #12
wooody CreditAttribution: wooody commentedThank you , It's work fine