• 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?

erich37

Well-known member
#1
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!
 

Adam Howard

Well-known member
#2
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
 

erich37

Well-known member
#3
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!
 

Jake Bunce

XenForo moderator
Staff member
#5
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>
 
#7
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>
Hello, I have a question to this! How can I breadcrumb_bottom disappear on every page?
 

erich37

Well-known member
#14
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>