fabsand Posted February 24, 2013 Share Posted February 24, 2013 Hello, I got a newbie question about Smarty. I assigned a value to a variable called $fb_fans in blockuserinfo.php What do I need to do to have Smarty display this variable value in blockuserinfo.tpl? It looks like I first have to assign $fb_fan value a name with smarty in blockuserinfo.php then call {thisname} in blockuserinfo.tpl. But what would be the exact syntax in blockuserinfo.php for that ? Any help will be greatly appreciated. Fab Link to comment Share on other sites More sharing options...
vekia Posted February 25, 2013 Share Posted February 25, 2013 for the first you need to add this variable to smarty, here is an example how assign looks: this->context->smarty->assign(array('infos' => $infos, 'nbblocks' => count($infos))); tip: you need to create 'fb_fan' => $fb_fan then you can use this variable in your template file Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now