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

how to hide "Breadcrumbs" for visitors?

Discussion in 'XenForo Questions and Support' started by erich37, Jul 31, 2012.

  1. erich37

    erich37 Well-Known Member

    Hello,

    I am running a Private Forum Community and I would like to hide the "Breadcrumbs" (at the Forum-Homepage) for visitors. Only logged-in members should see the "Breadcrums-Navigation".

    Is this possible somehow ?


    Appreciate your help!
    Many thanks!
     
  2. Adam Howard

    Adam Howard Well-Known Member

    I've not tested this and can only guess this is correct (please report back if it is)

    PHP:
    <xen:navigation>
        <
    xen:breadcrumb source="$nodeBreadCrumbs/>
    </
    xen:navigation>
    Located inside forum_view

    Wrap it around like so
    PHP:
    <xen:if is="{$visitor.user_id}">
    <
    xen:navigation>
        <
    xen:breadcrumb source="$nodeBreadCrumbs/>
    </
    xen:navigation>
    </
    xen:if>
    edit: fixed code
     
  3. erich37

    erich37 Well-Known Member

    Hi Adam,

    I tried this, but unfortunately it does not hide the "Breadcrumbs" at all.......

    Is there any other idea of how to do this, please?

    Many thanks!
     
  4. borbole

    borbole Well-Known Member

    The template you need is breadcrumb.
     
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Appearance -> Templates -> PAGE_CONTAINER

    Add the red code:

    Code:
    						<xen:hook name="page_container_breadcrumb_top">
    						<xen:if is="{$visitor.user_id} OR {$contentTemplate} != 'forum_list'">
    						<div class="breadBoxTop">
    							<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>
    						</xen:hook>
    
    You can add the same condition around the bottom breadbox if you want to hide those breadcrumbs as well:

    Code:
    			<xen:hook name="page_container_breadcrumb_bottom">			
    			<div class="breadBoxBottom"><xen:include template="breadcrumb" /></div>
    			</xen:hook>
    
     
    erich37 likes this.
  6. erich37

    erich37 Well-Known Member

    many thanks Jake!!!

    that works fine! :)
     
  7. Bonta-kun

    Bonta-kun Member

    Hello, I have a question to this! How can I breadcrumb_bottom disappear on every page?
     
  8. Itworx4me

    Itworx4me Well-Known Member

    Code:
    .PAGE_CONTAINER .breadBoxBottom {
    display: none;
    }
    place in the extra.css template
     
    Jake Bunce likes this.
  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    No .PAGE_CONTAINER

    Code:
    .breadBoxBottom {
    display: none;
    }
     
  10. Bonta-kun

    Bonta-kun Member

    That does not work.
     
  11. Bonta-kun

    Bonta-kun Member

    Works fine! Thanks
    My brain, how can I Post New Thread below also disappear on each side?
     
  12. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Bonta-kun likes this.
  13. Bonta-kun

    Bonta-kun Member

    Yes, thanks for help! (y)
     
  14. erich37

    erich37 Well-Known Member

    this is the correct way of hiding all breadcrumbs from guests (this also hides the breadcrumbs at the Register-page):

    Admin CP -> Appearance -> Templates -> PAGE_CONTAINER


    Code:
                       
                            <xen:hook name="page_container_breadcrumb_top">
    <xen:if is="{$visitor.user_id}">
                            <div class="breadBoxTop">
                                <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>
    
     
    Bram and Jake Bunce like this.

Share This Page