Remove Index from Navbar

Post Reply
steven
Posts: 133
Joined: Sun Oct 01, 2017 3:08 pm

Remove Index from Navbar

Post by steven »

On many boards, index performs the same function as home. To remove index from the NAS bar, open the navbar_header.html file

For phpBB 3.3.11 about line 193:
For phpBB 3.3.1-3.3.5 about line 185:

Change:

Code: Select all

			<!-- EVENT overall_header_breadcrumb_prepend -->
				<span class="crumb" {$MICRODATA}><a href="{U_INDEX}" itemprop="url" accesskey="h" data-navbar-reference="index"><!-- IF not U_SITE_HOME --><i class="icon fa-home fa-fw"></i><!-- ENDIF --><span itemprop="title">{L_INDEX}</span></a></span>
To the following code:

Code: Select all

			<!-- EVENT overall_header_breadcrumb_prepend -->
				<!-- Commented out Board Index here
				<span class="crumb" {$MICRODATA}><a href="{U_INDEX}" itemprop="url" accesskey="h" data-navbar-reference="index"><!-- IF not U_SITE_HOME --><i class="icon fa-home fa-fw"></i><!-- ENDIF --><span itemprop="title">{L_INDEX}</span></a></span>
				-->

For php v 3.2.2 locate the code below (about line 192)

Code: Select all

			{% EVENT overall_header_breadcrumb_prepend %}
				<span class="crumb" {{ MICRODATA }}><a itemprop="item" href="{{ U_INDEX }}" accesskey="h" data-navbar-reference="index">{% if not U_SITE_HOME %}<i class="icon fa-home fa-fw"></i>{% endif %}<span itemprop="name">{{ L_INDEX }}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
Replace with the following code:

Code: Select all

			<!-- IF 0 -->
			{% EVENT overall_header_breadcrumb_prepend %}
				<span class="crumb" {{ MICRODATA }}><a itemprop="item" href="{{ U_INDEX }}" accesskey="h" data-navbar-reference="index">{% if not U_SITE_HOME %}<i class="icon fa-home fa-fw"></i>{% endif %}<span itemprop="name">{{ L_INDEX }}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
			<!-- ENDIF -->
After you make the change, log into ACP (Admin Control Panel) and purge the cache so your changes take effect.
Post Reply