Renari
Member
I have an array $user that I want to pass all of it's contents to a template.
Then in the template:
And... the output:
Not sure what I'm doing wrong.
PHP:
$user = array(username => 'test', avatar =>'http://xenforo.com/community/styles/default/xenforo/logo.png')
$params = $template->getParams();
$hookParams += $user;
$params += $hookParams;
$content .= $template->create('template_name', $params);
Then in the template:
HTML:
<li>
<a href="http://xenforo.com"><img src="{$avatar}" alt="{$username}"></a>
</li>
And... the output:
HTML:
<li>
<a href="http://xenforo.com"><img src="" alt=""></a>
</li>
Not sure what I'm doing wrong.