XF 2.0 Page node callback

S Thomas

Well-known member
Not sure what I'm missing, but probably something really stupid.
I've setup a callback in a page node. I'm adding an extra variable like this:
PHP:
$params = ["test" => "asd"]
$reply->setPageParams($params, true);
And in the page node html I'm using
HTML:
{$test} // no output
{{dump($test)}} // null
{{dump($__globals)}} // null
However, if I dump globals in a sidebar or something, I can clearly see "test" => "asd" is being set properly. Anyone any idea what I'm missing?
 
You'll be dealing with a XF\Mvc\Reply\View reply here. That has a specific method for passing view params to the template:
PHP:
$reply->setParams(['test' => 'asd']);
 
Top Bottom