0 Comments | 0 Shares | Urdhva Tech

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.

    global $current_user;
    $this->_tpl_vars['current_user_email'] = $current_user->email1;

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:
  • No Comments Found.
Post your comment