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


Discussion in 'XenForo Development Discussions' started by Valhalla, Oct 2, 2014.

  1. Valhalla

    Valhalla Well-Known Member

    What is the best way to use an alternative PAGE_CONTAINER template under certain circumstances?

    What I might do is modify the renderContainer method from ViewRenderer/HtmlPublic.php.

    At the moment I am altering the template individually for each action that requires it, by altering the responseView (below), but I'm sure there is a better way.

    return $this->responseView('XenForo_ViewPublic_Error_RegistrationRequired', 'error_with_login', $viewParams, array('containerTemplate' =>
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. Valhalla

    Valhalla Well-Known Member

    Thanks, will have a look at that.
  4. Valhalla

    Valhalla Well-Known Member

    This worked:

    public static function frontControllerPreView(XenForo_FrontController $fcXenForo_ControllerResponse_Abstract &$controllerResponseXenForo_ViewRenderer_Abstract &$viewRenderer, array &$containerParams)
    $containerParams += array(
    'containerTemplate' => 'ALT_PAGE_CONTAINER'

Share This Page