Selecting another template at boot time?

ericdes

New member
I'd like to display a thread with another template that I'd select from the URL, like this: http://example.com/index.php?threads/thread-1.1/&use-template=custom_template

Or I could also bootstrap XenForo with another parameter:
PHP:
$fc = new XenForo_FrontController(new Custom_Dependencies_Public());
$fc->run();
The constructor of Custom_Dendencies_Public would set a field that would trigger the use of a customized template. Would this be a good way to achieve what I want?

Any thoughts would be appreciated!
 
A custom dependency object? That's way too low level.

Instead, you can dynamically extend the Thread controller's index action, grab the response object returned by parent::, set your own template name and return it.
 
Top Bottom