Jump to content

Edit History

ThibaultWUN

ThibaultWUN


solved

I have a php file in which  I assign a var

$this->context->smarty->assign('test', 'test' );

Immediately after, I display my template.

return $this->display(__FILE__, 'template.tpl');

In my template, I try to access my var

<div style="display:none;">{$test|var_dump}</div>
<div style="display:none;">{$test}</div>

The first line gives me NULL. How is it possible ? What am I doing wrong ?

ThibaultWUN

ThibaultWUN

I have a php file in which  I assign a var

$this->context->smarty->assign('test', 'test' );

Immediately after, I display my template.

return $this->display(__FILE__, 'template.tpl');

In my template, I try to access my var

<div style="display:none;">{$test|var_dump}</div>
<div style="display:none;">{$test}</div>

The first line gives me NULL. How is it possible ? What am I doing wrong ?

×
×
  • Create New...