View Single Post
  #1  
Old 11-16-2009, 01:13 PM
 
jherzog jherzog is offline
 

Advanced Member
  
Join Date: Jan 2006
Posts: 93
 

Default $userinfo on welcome.tpl

I need to display a message on the customer/main/welcome.tpl page. I need to access a couple of user specific fields typically in the $userinfo.additional_fields array. But $userinfo is not defined in home.php and hence is empty in welcome.php.

I can add to home.php
$smarty->assign("currentUser",func_userinfo($login,'C')) ;

And it works great.

But:
1) I only need this for welcome.php but it will load this info for all pages driven by home.php (I could write more php to get around this).
2) I have to modify the core file home.php to do this. I would rather only modify the template files.

Can I do this completely in welcome.tpl?

I tried:
{php}
$userinfo = func_userinfo($login,'C');
{/php}

But that didn't work. Any suggestions ?

Thanks,
Jed
__________________
Jed Herzog
Gold X-Cart 4.0.17
http://www.outliersolutions.com
Portland Advertising Agency,
Portland Web Design
Reply With Quote