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

Easiest way to disable navbar on forum_view

Discussion in 'XenForo Development Discussions' started by Marcus, Aug 8, 2015.

  1. Marcus

    Marcus Well-Known Member

    When I remove the navbar from the template, the navbar will still be displayed as "Forum>".
    Code:
    <xen:navigation>
        <xen:breadcrumb source="$nodeBreadCrumbs" />
    </xen:navigation>
    What is the quickest way to remove the navbar from forum_view? A preg_replace in the ViewPublic_Forum_View?
     
  2. batpool52!

    batpool52! Well-Known Member

    By navbar do you mean Navigation Bar or the Breadcrumb? You're talking about navbar but removing breadcrumb code.
     
  3. imthebest

    imthebest Formerly Super120

  4. Marcus

    Marcus Well-Known Member

    Thanks ! I meant the breadcrumbs.

    At ViewPublic I have this in the $this->_params array:
    Code:
    ["pageNavParams"] => array(2) {
    ["order"] => bool(false)
    ["direction"] => bool(false)
    }
    ... this will result in displaying "Forums > " at the top of the page. It would be great to remove the breadcrumbs at all.
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Use a conditional statement in the PAGE_CONTAINER template or CSS to hide it.
     
  6. batpool52!

    batpool52! Well-Known Member

    The easiest method would be to use the EXTRA.css, try adding and see if it hides the breadcrumb
    Code:
    #content.forum_view .breadBoxTop,
    #content.forum_view .breadBoxBottom
    {
    display: none;
    }
    The other method is to to edit PAGE_CONTAINER template, example:
    Find:
    PHP:
    <div class="breadBoxTop {xen:if $topctrl, withTopCtrl}">
                                <
    xen:if is="{$topctrl}"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
                                <
    xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
                            </
    div>
    Replace with
    PHP:
    <xen:if is="{$contentTemplate} != 'forum_view'">
                            <
    div class="breadBoxTop {xen:if $topctrl, withTopCtrl}">
                                <
    xen:if is="{$topctrl}"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
                                <
    xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
                            </
    div>
                            </
    xen:if>
     
  7. Alfa1

    Alfa1 Well-Known Member

    I always use the first method with extra.css but with
    Display: none !important;
     
  8. Marcus

    Marcus Well-Known Member

    Thanks, I use this to only hide the breadcrumbs while still display the new topic button:
    Code:
    #content.forum_view .breadBoxTop .crumbs,
    #content.forum_view .breadBoxBottom .crumbs
    { display: none; }
     

Share This Page