Friday 14 October 2005 6:26:46 am
Hello, I'm wondering how I can pass variables between templates. More speficially, I need to show the logged in username on top of the page regardless of which page the user is looking at. Right now I use the following code in pagelayout.tpl, but it works only in this template:
{def $user=fetch( 'user', 'current_user' )}
User: {$user.contentobject.name} <br />
I would like to show this variable in a template named top.tpl (part of static content). But the code above doesn't return any value. I think the solution is to pass the variable along, but how? This is EZ publish 3.6.1 btw. Thanks for any suggestions.
|