We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Assign variables to theme themplate | Forum

Sean
Sean Jul 7 '15
Hello, 


Does anyone know how I can assign variables to theme template files? 


I've used the $this->assign method but this only adds the variable to the {$content}  section of a page. I want to add something above this. 


It's part of development for a new theme. 

Sean
Sean Jul 7 '15
In short I'm trying to assign variables to the general.html file. 
Sean
Sean Jul 7 '15
Found it:


$viewRenderer = OW_ViewRenderer::getInstance();

$viewRenderer->assignVar('pageMenu', $pageMenu);

The Forum post is edited by Sean Jul 7 '15