Add $user to my template

Marc

Well-known member
I am trying to move what I have done in a listener over to a template, however in order to do this I need to return the users status. In the message_user_info template I can retrieve this by simply using $user.status and I would like to do this from my own template.

I have added a template and added $user.status into it, then in the message_user_info added
HTML:
	<xen:include template="myTemplate" />

which returns the text $user.status rather than the value of it. So looking at the templates more I figured thats what the following should do.

HTML:
 	<xen:include template="myTemplate">
		<xen:map from="$user" to="$user" />
	</xen:include>

which is obviously a complete guess, as I was guessing that this maps the variable to my template.. Guessing not lol.

Please could someone let me know how I acheive this?

PS:- I will probably be the highest user of this section of the board in the next few days LMAO
 
Variables have to be surrounded in curly braces when you want to output them:

<p>$user.status</p> // prints $user.status
<p>{$user.status}</p> // prints I ate some cheese.
 
Top Bottom