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

Conditionals to change the board title but not the thread title

Discussion in 'Styling and Customization Questions' started by giorgino, Feb 14, 2013.

  1. giorgino

    giorgino Well-Known Member

    I need to move the board title from under notices to over notices.

    There is an add-on for this http://xenforo.com/community/threads/8thos-move-notices.39447/ but this add-on, moving the notices and not the titles, move the threads title also.

    So, is there a template conditional that distinguish between board and all others titles?

    Thanks
     
  2. giorgino

    giorgino Well-Known Member

    Can someone help? :)
     
  3. giorgino

    giorgino Well-Known Member

  4. RoldanLT

    RoldanLT Well-Known Member

    <xen:if is="{$contentTemplate} != 'thread_view'">
    This content will not show on the Threads
    </xen:if>
     
    Jake Bunce and giorgino like this.
  5. giorgino

    giorgino Well-Known Member

    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>                    
     
    Evina likes this.
  6. giorgino

    giorgino Well-Known Member

    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 :(
     
  7. giorgino

    giorgino Well-Known Member

    Found it!

    <xen:if is="{$contentTemplate} == 'forum_list'">
     
    Shelley, Evina and Jake Bunce like this.

Share This Page