Conditionals to change the board title but not the thread title

giorgino

Well-known member
#5
Work great Evina! Thank you so much!

This is the template modification with your contribution :)

Search for
Code:
<xen:hook name="page_container_notices">
                        <xen:include template="notices" />                       
                        </xen:hook>
                       
                        <xen:hook name="page_container_content_title_bar">
                        <xen:if is="!{$noH1}">                       
                            <!-- h1 title, description -->
                            <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>
                        </xen:if>
                        </xen:hook>
Replace with:

Code:
<xen:if is="{$contentTemplate} != 'thread_view'">
                        <xen:hook name="page_container_content_title_bar">
                        <xen:if is="!{$noH1}">                       
                            <!-- h1 title, description -->
                            <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>
                        </xen:if>
                        </xen:hook>
<xen:hook name="page_container_notices">
                        <xen:include template="notices" />                       
                        </xen:hook>
<xen:else />
<xen:hook name="page_container_notices">
                        <xen:include template="notices" />                       
                        </xen:hook>
                       
                        <xen:hook name="page_container_content_title_bar">
                        <xen:if is="!{$noH1}">                       
                            <!-- h1 title, description -->
                            <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>
                        </xen:if>
                        </xen:hook>
    </xen:if>
 

giorgino

Well-known member
#6
<xen:if is="{$contentTemplate} != 'thread_view'">
This content will not show on the Threads
</xen:if>
Evina, what about a template conditional that include the forum index only? Something like:
<xen:if is="{$contentTemplate} = 'forum_list'">

The above don't work :(
 
Top