cancel
Showing results for 
Search instead for 
Did you mean: 

Display User Name in Header Template

bigrob
Champ in-the-making
Champ in-the-making
Hi guys, i've been customising my templates and i've hit a bit of a wall. I want to display the current users username in header.get.html.ftl to the right of the logo. I'm a web developer so i've got the layout covered it's just the javascript to product the variable that's failing me.

from what i've been reading I thought that ${person.properties.firstName} would print the user's name but all I get is an error, i'm assuming I have to somehow call the function first?

Any pointers would be much appreciated,
Rob
2 REPLIES 2

jordiv
Champ on-the-rise
Champ on-the-rise
Hi,

You should be able to get the current user's username with:
${user.name}
Cheers,
Jordi.

bigrob
Champ in-the-making
Champ in-the-making
It just had to be that simple, Thanks Jordi!