Blogs
02
May
May
Greetings from Urdhvatech!
Sometimes situation may arise when you want some PHP code in tpl. Following piece of code will show how to achieve this.
Sometimes situation may arise when you want some PHP code in tpl. Following piece of code will show how to achieve this.
{php}
global $current_user;
$this->_tpl_vars['current_user_email'] = $current_user->email1;
{/php}
global $current_user;
$this->_tpl_vars['current_user_email'] = $current_user->email1;
{/php}
Now use 'current_user_email' variable as follows in tpl.
<input type="text" id = "current_user_email" name="current_user_email" value='{$current_user_email}'>
Hope it helps.
Feel free to leave your comments.
Download attachments:
Comments
- No Comments Found.