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

Moving title bar is just not working

Discussion in 'Styling and Customization Questions' started by Luxus, Jun 9, 2012.

  1. Luxus

    Luxus Well-Known Member

    Allright, a standard XenForo thread looks like this:
    test1.png

    I tried to move the title bar in threads, so it should look like this:
    test2.png

    However no matter what I do with the html it's just not working. Try it out for yourselves. I don't get why it's so difficult to accomplish such simple thing. There may be a complicated mechanism behind this that I failed to figure out.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That is the titleBar in this template:

    Admin CP -> Appearance -> Templates -> PAGE_CONTAINER

    It always comes before the content.

    You can remove it by changing the xen:h1 tag in the content template. In your case it would be this template:

    Admin CP -> Appearance -> Templates -> thread_view

    Replace this:

    Code:
    <xen:h1>{xen:helper threadPrefix, $thread}{$thread.title}</xen:h1>
    
    With this:

    Code:
    <xen:h1></xen:h1>
    
    Then you can paste the titleBar code from PAGE_CONTAINER into thread_view to manually place it on the page.
     
  3. Luxus

    Luxus Well-Known Member

    When I do exactly like you said the titles of all threads become the global name of my site.
     
  4. Luxus

    Luxus Well-Known Member

    Is there any fix for this?
     
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I don't have this problem in my testing. I can take a look if you give me a URL and admin login.
     
  6. Luxus

    Luxus Well-Known Member

    Still on localhost. Hm.. perhaps I did something wrong with the template. Here is my thread_view template after I did the steps from your post (the copy&pasted code from PAGE_CONTAINER starts at "<!-- Code from PAGE_CONTAINER template -->": http://pastie.org/private/clqzvnsinduqwmeztvymw

    I had to use pastie.org because I would've reached the 10000 characters limit.
     
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Looks fine to me. When I do this on my test forum it completely removes the h1 at the top of the page. For example:

    Screen shot 2012-06-10 at 6.18.02 AM.png

    This part is gone when I use an empty xen:h1.
     
  8. Luxus

    Luxus Well-Known Member

    Yes for me it's also gone when I use an empty xen:h1, but the copy&pasted code from the PAGE_CONTAINER template doesn't work in the thread_view template. I mean this code:
    HTML:
    <div class="titleBar">
        {xen:raw $beforeH1}
        <h1><xen:if is="{$h1}">{xen:raw $h1}<xen:elseif is="{$title}" />{xen:raw $title}<xen:else />{$xenOptions.boardTitle}</xen:if></h1>
        
        <xen:if is="{$pageDescription.content}"><p id="pageDescription" class="muted {$pageDescription.class}">{xen:raw $pageDescription.content}</p></xen:if>
    </div>
    Only the $xenOptions.boardTitle variable works, hence why all thread titles will become the board name. xen:raw $title and xen:raw $h1 are empty when posted in the thread_view template.
     
  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Yeah that's expected. You can use different variables. Replace {xen:raw $h1} with {xen:helper threadPrefix, $thread}{$thread.title} (which is the h1 value you removed before).
     
  10. Luxus

    Luxus Well-Known Member

    Still not working either. The board title becomes the name of all threads again. Are you sure that it's working for you?
     
  11. Luxus

    Luxus Well-Known Member

    Please guys, anyone have an idea? I can't submit a ticket because it's a template modification question :(
     
  12. Luxus

    Luxus Well-Known Member

    I have managed to accomplish it with an absolute position in CSS of the thread status bar and the pageNavLinkGroup bar. It's not the best solution, but it gets the job done.
     

Share This Page