Selecting another template at boot time?


New member
I'd like to display a thread with another template that I'd select from the URL, like this:

Or I could also bootstrap XenForo with another parameter:
$fc = new XenForo_FrontController(new Custom_Dependencies_Public());
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!


Well-known member
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.