Jump to content

Blockuserinfo.php To Blockuserinfo.tpl


Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...