Assigning variables to ametemplate

Hi there

I’m trying to assign values to variables in a smarty template.

I have, in my Controller class:

$view = Piwik_ViewDataTable::factory(‘graphVerticalBar’);
$view->init($this->pluginName, FUNCTION, ‘Labs.fn_name’);
$smarty = new Piwik_Smarty();
$tpl = ‘template.tpl’;
$smarty->assign(‘test_val’, ‘355866’);

and in template.tpl

In Google Chrome I’m getting:

Uncaught SyntaxError: Unexpected token ILLEGAL

pointing me to index.php line 562.



shows the variable set correctly.

Any help would be much appreciated.

Thanks in advance for your time

David Robinson