I would like to add a link to the taskbar that would use the "realname" value from the module (http://drupal.org/project/realname) that links to the user profile page using PHP code or token values. Example:
<a href="user/[current-user:uid]">[realname]</a>
I also tried using the php code below but it doesn't seem supported in the 'custom' section of taskbar?
<?php
global $user;
print theme('username', $user);
?>
I installed the 'menu token' module for this and still cannot get support for the tokens in taskbar. Also, I have tried to do this via PHP using the "add custom" function in the taskbar, but also did not find a way to accomplish this.
<?php global $user; print ($block->module == 'user' && $block->subject == $user->name) ? theme('username', $user) : $block->subject ?>
I am using this code (http://drupal.org/node/353253) to change the title of the user navigation block to the 'realname' of the user, but cannot get this to work in taskbar either by adding the block.
Any help or suggestions to solve this problem via code would be appreciated. Thanks.
Comments
Comment #1
jcisio commentedThere are two feature requests:
- Support token in item title. I keep this issue for this request.
- Support input format for custom item. Please open new issue for this one.
Comment #2
jcisio commentedSupport is added for custom text provider. For others, the title is created programmatically, so it does not need token support.