By Mr.Rox on
Hi guys,
i dont know if is the right place to post my problem...
I want to see the username of the current user as primary link.
i testet very much but it doesnt work
' print $user->uid;' etc.
i looked to the html-sourcecode and i saw that some symbols are converted in other "varibles"
for example '<' is '&'lt;' (without ')
Do you know a solution?
thx
Rox
Comments
I believe you can't normally
I believe you can't normally have php code in title executed. You either put your php in a field with input format PHP code, or directly in your theme template.
Cheers,
alex
Hills Web
Hills Web
I think that you could do
I think that you could do this via theme_menu_link. Just add a placeholder token as the menu item, and check for this in the theme override.
Another way is to create a module to do a custom menu link, but that would be overkill unless you already have a module that you could use.
Alan Davison
thx a lot
Thank you very much.
Where I must write it? page.tpl.php?
Can you write an example please?
Thx a lot
Rox
Hi Rox, login to the site
Hi Rox,
login to the site http://www.dashplanet.com with username "test" password "test" and check out the top left block. Is it somewhat near to what you require?
This is very customizable, let me know if you need something like that and i'll explain with details.
Abdullah
hi abdullah, yeah but not a
hi abdullah,
yeah but not a block but a primary link like facebook with 'your name' and when you click you goes to your profile.
Please wait just a few
Please wait just a few moments. Im gonna tell you shortly what you can do as alternative.
thx a lot i have time no
thx a lot
i have time no stress ;)
Rox
All done. I compiled a little
All done. I compiled a little article and posted on the site.
Customizng Drupal Login Block As Horizontal Bar and Adding Links
Also try http://drupal.org/node/17272 for more.
thank you very much. there is
thank you very much.
there is only one error:
original:
corect:
Ooops. :D Thanks a lot for
Ooops. :D Thanks a lot for correction.
No Problem, new Problem ;)
It's possible to highlight this primary link in my block where i am?
example: When I am on the Homepage of the site, i want to see my primary link "Home" in an other color or something like this?
Thank you
Rox
Hi Rox, this can be done too.
Hi Rox, this can be done too.
Two ways come to my mind right now. One using javascript and other adding some logic in that php code, that will check if the url opened is same as the link then apply some css class to it. Checking this for all the links will do what you are saying. Will try to put this into previous code and post.
thx you are the world
thx
you are the world greatest
thank you for your helpfulness
Rox
Rox, I have added code for
Rox, I have added code for doing this. Please check out and leave a comment there too if you could :)
identifying formatting current url from within custom menu
Abdullah
thank you very much it works
thank you very much it works perfect.
have a nice weekend
Rox