XF 2.0 Overriding style

bengineer

Member
HI,

I've create a simple add-on which extends XF\Pub\Controller\Forum, and have attached it to a Navigation link. I'm now trying to work out how I can override the default style on this specific link (in much the same way that individual Nodes can have a Style override applied). Do I need to pass some view parameters to the view?

PHP:
$viewParams = ['nodeTree' => $nodeTree,
    'nodeExtras' => $nodeExtras,
    'selfRoute' => $selfRoute,
];

return $this->view('XF:Forum\Listing', 'subforum_list', $viewParams);

Ben
 
It's not set via any link, but rather in the controller:
PHP:
$this->setViewOption('style_id', $styleId);
 
Back
Top Bottom