Moving title bar is just not working

Luxus

Well-known member
Allright, a standard XenForo thread looks like this:
test1.webp

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

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

This part is gone when I use an empty xen:h1.
 
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.
 
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.

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).
 
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.
 
Top Bottom