Remove Index from Navbar

Steve
Posts: 126
Joined: Sun Oct 01, 2017 3:08 pm

Remove Index from Navbar

Post by Steve »

On many boards, index performs the same function as home. To remove index from the NAS bar, open the navbar_header.html file and locate the code below (about line 185):

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>
Replace with 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

			<!-- Commented out Board Index here
			{% 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>
			-->
After you make the change, log into ACP (Admin Control Panel) and purge the cache so your changes take effect.