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

XF 1.2 How to remove all elements from a xF page

Discussion in 'XenForo Questions and Support' started by The Dark Wizard, Nov 20, 2013.

  1. The Dark Wizard

    The Dark Wizard Well-Known Member

    Using xF's built in page system we have created a page, how would one go about removing all the elements from a page, we want to remove all things generated by xF so we can insert the HTML and stuff we have done to create a nice splash page.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    What do you mean by all elements?

    Do you mean the header, footer, breadcrumbs, etc?
  3. The Dark Wizard

    The Dark Wizard Well-Known Member

    Yes everything. I want to essentionally have the equvilant of a blank HTML document but still handled by the xF system, so we can make it in the index.

    Currently the only way that I see to do it is this: http://xenforo.com/community/threads/how-to-remove-all-xf-navigation-items-from-xf-page.63134/

    but making a style just for that one page seems like overkill.
  4. Mike

    Mike XenForo Developer Staff Member

    I don't know if it's possible off hand. At the least, you'd need to write custom PHP code, but there are still some templates that are involved that may not be overridable.

    The style approach is probably the easiest option.
  5. xf_phantom

    xf_phantom Well-Known Member

    Create a template 'mycontainer' with your container content
    Create following class:
    class Page {

      public static function 
    getPageOutput(XenForo_ControllerPublic_Abstract $controllerXenForo_ControllerResponse_Abstract &$response){

    $response->containerParams['containerTemplate'] = 'mycontainer';
    and register it as your page callback function
    Last edited: Nov 20, 2013

Share This Page