• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Remove "Home" link from the breadcrumb menu

Umit

Active member
Edit Template: breadcrumb
PHP:
<span class="crumbs">
            <span class="crust"{xen:if $microdata, ' itemscope itemtype="http://data-vocabulary.org/Breadcrumb"'}>
                <a href="{$homeLink}" class="crumb" rel="up" itemprop="url"><span itemprop="title">{xen:phrase home}</span></a>
                <span class="arrow"><span></span></span>
            </span>
            
            <xen:if is="{$selectedTab}">
                <span class="crust"{xen:if $microdata, ' itemscope itemtype="http://data-vocabulary.org/Breadcrumb"'}>
                    <a href="{$selectedTab.href}" class="crumb" rel="up" itemprop="url"><span itemprop="title">{$selectedTab.title}</span></a>
                    <span class="arrow"><span>&gt;</span></span>
                </span>
            </xen:if>


to:
PHP:
<span class="crumbs">
            <!--<span class="crust"{xen:if $microdata, ' itemscope itemtype="http://data-vocabulary.org/Breadcrumb"'}>
                <a href="{$homeLink}" class="crumb" rel="up" itemprop="url"><span itemprop="title">{xen:phrase home}</span></a>
                <span class="arrow"><span>&gt;</span></span>
            </span>-->
            
            <xen:if is="{$selectedTab}">
                <span class="crust"{xen:if $microdata, ' itemscope itemtype="http://data-vocabulary.org/Breadcrumb"'}>
                    <a href="{$selectedTab.href}" class="crumb" rel="up" itemprop="url"><span itemprop="title">{$selectedTab.title}</span></a>
                    <span class="arrow"><span></span></span>
                </span>
            </xen:if>

basically, just added <!--, --> and removed a &gt;
 
I'm new to XenForo and PHP so bear with me please. It doesn't seem to work for me when I copy/paste it. I get an error "The following templates contained errors and were not saved: breadcrumb: 1) Line 30: Template syntax error.

My code is like this:
PHP:
<xen:edithint template="breadcrumb.css" />

<nav>
    <xen:if is="!{$quickNavSelected} AND {$navigation}">
        <xen:foreach loop="$navigation" value="$breadcrumb">
            <xen:if is="{$breadcrumb.node_id}">
                <xen:set var="$quickNavSelected">node-{$breadcrumb.node_id}</xen:set>
            </xen:if>
        </xen:foreach>
    </xen:if>

    <fieldset class="breadcrumb">
        <a href="{xen:link misc/quick-navigation-menu, '', 'selected={$quickNavSelected}'}" class="OverlayTrigger jumpMenuTrigger" data-cacheOverlay="true" title="{xen:phrase open_quick_navigation}"><!--{xen:phrase jump_to}...--></a>

        <div class="boardTitle"><strong>{$xenOptions.boardTitle}</strong></div>

<span class="crumbs">
            <!--<span class="crust"{xen:if $microdata, ' itemscope itemtype="http://data-vocabulary.org/Breadcrumb"'}>
                <a href="{$homeLink}" class="crumb" rel="up" itemprop="url"><span itemprop="title">{xen:phrase home}</span></a>
                <span class="arrow"><span>&gt;</span></span>
            </span>-->
                </span>
            <xen:elseif is="{$selectedTabId} != {$homeTabId}" />
                <span class="crust"{xen:if $microdata, ' itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb"'}>
                    <a href="{$homeTab.href}" class="crumb" rel="up" itemprop="url"><span itemprop="title">{$homeTab.title}</span></a>
                    <span class="arrow"><span></span></span>
                </span>
            </xen:if>

            <xen:if is="{$selectedTab}">
                <span class="crust"{xen:if $microdata, ' itemscope itemtype="http://data-vocabulary.org/Breadcrumb"'}>
                    <a href="{$selectedTab.href}" class="crumb" rel="up" itemprop="url"><span itemprop="title">{$selectedTab.title}</span></a>
                    <span class="arrow"><span></span></span>
                </span>
            </xen:if>

            <xen:if is="{$navigation}">
                <xen:foreach loop="$navigation" value="$breadcrumb" i="$i" count="$count">
                    <span class="crust"{xen:if $microdata, ' itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb"'}>
                        <a href="{xen:raw $breadcrumb.href}" class="crumb" rel="up" itemprop="url"><span itemprop="title">{xen:raw $breadcrumb.value}</span></a>
                        <span class="arrow"><span>&gt;</span></span>
                    </span>
                </xen:foreach>
            </xen:if>
        </span>
    </fieldset>
</nav>

Any help?
 
I wanted to remove the ambiguity of "Home" as a link.
I didn't want to alter the link on the Home tab at the top going to my main site index page, but I wanted to remove the Home section from the breadcrumb bar below and in the footer.

Go down to
Code:
 <span class="crumbs">
Comment out the next bit like this:
(Comment out symbols are on line 2 and second to last line The 1st and last line of code is shown here only as landmarks.)

Code:
        <span class="crumbs">
            <!--  <xen:if is="{$showHomeLink}">
                <span class="crust"{xen:if $microdata, ' itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb"'}>
                    <a href="{$homeLink}" class="crumb"{xen:if $microdata, ' rel="up" itemprop="url"'}><span{xen:if $microdata, ' itemprop="title"'}>{xen:phrase home}</span></a>
                    <span class="arrow"><span></span></span>
                </span>
            <xen:elseif is="{$selectedTabId} != {$homeTabId}" />
                <span class="crust"{xen:if $microdata, ' itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb"'}>
                    <a href="{$homeTab.href}" class="crumb"{xen:if $microdata, ' rel="up" itemprop="url"'}"><span{xen:if $microdata, ' itemprop="title"'}>{$homeTab.title}</span></a>
                    <span class="arrow"><span></span></span>
                </span>
            </xen:if>  ->

            <xen:if is="{$selectedTab}">
Done!
Both breadcrumb bar at top and bottom now relate only to the forums, wiki, whatever is part of your XF.
But there is a link back to your main site still on the Home tab.
To me this is less confusing as once people arrive at the XF community area their attention should be able to stay on it, though there needs to be a link near the top left (intuitively) so as to return to/ discover the main site, if you have one.
 
Is there a way to remove "Forums" from the breadcrumbs, but not "Home"?
Admin Control Panel -> Appearance -> Styles & Templates -> Templates ( make sure that you've selected the right style ) -> breadcrumb

Find and remove the contents below :

Code:
<xen:if is="{$selectedTab}">
<span class="crust"{xen:if $microdata, ' itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb"'}>
<a href="{$selectedTab.href}" class="crumb"{xen:if $microdata, ' rel="up" itemprop="url"'}><span{xen:if $microdata, ' itemprop="title"'}>{$selectedTab.title}</span></a>
<span class="arrow"><span>&gt;</span></span>
</span>
</xen:if>

(y)
 
Top Bottom