1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Selecting another template at boot time?

Discussion in 'XenForo Development Discussions' started by ericdes, Feb 14, 2011.

  1. ericdes

    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:
    $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!
  2. Shadab

    Shadab 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.

Share This Page