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

XF 1.4 How do I display page node content within PAGE_CONTAINER template?

Discussion in 'Styling and Customization Questions' started by RalleRalle, Feb 6, 2015.

  1. RalleRalle

    RalleRalle Member

    Hi,

    sorry, I was not able to find anything on this with the search (or: I found too much which was not related to what I want to do)

    I would like to use xenforo to serve a static HTML-page without any javascript or xenforo-headers or anything.

    What I did:

    1.) I defined a new style called "Blank"
    2.) In that style I changed the template "PAGE_CONTAINER" to:
    Code:
    <html>
    <head>
    <title></title>
    </head>
    
    <body>
    Testing 123
    {xen:raw $templateHtml}
    </body>
    </html>
    
    3.) Next I defined a new page node, and chose the style "Blank".


    Voila: The page is displayed, the "Testing 123" shows up OK, but not what I defined as HTML-content for the page node.

    What tag do I have to embed to get the content of the page node?
    {xen:raw $templateHtml} does not seem not work.

    Thank you!
     
    Last edited: Feb 6, 2015
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. RalleRalle

    RalleRalle Member

    Hi @Brogan thanks for the answer.
    That was one of the threads I reviewed befor posting here.

    It seems to me that that is an instruction for coders who want to build an add-on with php-code and all.
    I simply want to display a page with static HTML. I thought there must be a way do that only using the template-system...
    ?
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Try using {xen:raw $contents} instead of {xen:raw $templateHtml}.
     
  5. RalleRalle

    RalleRalle Member

    mmmh, that gives me the wanted output, but also more content that i dont want:

    Code:
    <div id="pageNodeContent">
    <article>
    
    before the content. And after it:
    Code:
    </article>
    <div class="bottomContent">
    <div class="sharePage">
    (all the share-buttons here)
    </div>
    </div>
    
    is this another template I have to tweak?
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    You can edit the pagenode_container template to remove any other elements which aren't required.
     
  7. RalleRalle

    RalleRalle Member

    That worked. my pagenode_container template is now only:
    Code:
    {xen:raw $templateHtml}
    
    ALRIGHT, thanks!
     
  8. RalleRalle

    RalleRalle Member

    BTW: It would help so much I one could switch the language of the admin-panel to english without changing the language of the whole forum.
    I run the forum in another language and so here in this xenforo-community I cannot post the exact wording of my admin menus or even screenshots...
     
  9. zLemonProz

    zLemonProz Member

    I've tried everything here but still get http://lemoncloud.org/pages/splash/

    My PAGE_CONTAINER:
    Code:
    <html>
    <head>
    <title></title>
    </head>
    
    <body>
    Testing 123
    {xen:raw $contents}
    </body>
    </html>
    My pagenode_container:
    Code:
    {xen:raw $templateHtml}
    And here are the page settings:
    [​IMG]
    [​IMG]
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    All I see is '123'.
     
  11. zLemonProz

    zLemonProz Member

    Yes that's what I'm saying. It's not working for me, all I see is:
    [​IMG]
     

Share This Page