I'm very new to drupal, I've got a basic understanding of PHP and how it should be written but I think I'm still struggling with the concept of where to add code, at what point I need to jump in to edit things and make my own style do its thing
All I want to do is change my default user menu from:
User Menu
- My Account
- Log out
To
Logged in as:
[username]
My Account
Log Out (where both buttons have mybtn class applied to them rather than in a ul)
I've seen I can remove the ul function from the list that is outputted with the following code
function MYTHEME_menu_tree__user_menu(&$variables) {
return $variables['tree'];
}
And I've also tried to add the username to the content of the username with this block
function MYTHEME_preprocess_block(&$vars){
global $user;
$block =& $vars['block'];
if ($block->module == 'system' && $block->delta == 'user-menu') {
if (user_is_logged_in()) {
$block->content .= check_plain($user->name);
}
}
}
(this code was modified from someone explaining how to change the subject of the block to the username)
I'd really appreciate any help with where to go next
Kind regards