// you’re reading...

Tips N Tricks

Joomla: Hide breadcrumb on the Home page

Typical requirement this is. You want to display the breadcrumb on the top of every page but the home page – also called the default page or the frontpage in Joomla. This is because you don’t just want the text “HOME” hanging on the top of your Joomla’s home page.

The “Home” may be already highlighted in the main menu, visitors know that they are on the home page and the breadcrumb is not aiding any navigation. Unfortunately, the breadcrumb module (called mod_breadcrumbs) in Joomla 1.5 does not provide any option to hide it on home page and show it on other pages.If like me, you are convinced about this issue and are adamant to fix it, the solution is quite simple and requires minimal understanding of Joomla templates. Here you go:

  • Login to Joomla admin panel, goto Extensions>Module Manager
  • From the “-Select Type-” dropdown, select mod_breadcrumbs
  • Note the Position of the mod_breadcrumbs module. Typically, the position will be called “breadcrumb”. It may also be “top” or “header”. In the latter case, we may get into some trouble, as I will explain later.

Corresponding to the noted down position, you will have a tag in the file named index.php, found in <joomla-directory>/templates/<theme-name>:

<jdoc:include type=”modules” name=”breadcrumb” />

Substitute this line with the following lines:

<?php
$menu = & JSite::getMenu();
if (!($menu->getActive() === $menu->getDefault())) {
?>

<jdoc:include type=”modules” name=”breadcrumb” />

<?php
}
?>

The above lines of code shows the breadcrumb only when the page is not the default page i.e. not the home page. That’s it!

But, this works only if the breadcumb module, is the only module, published in the position. If you have other modules published in the same position, you will end up hiding all of them on the home page. Some templates include the breadcrumb module in the positions like “top” or “header” along with Main Menu module. This will hide the menu on the home page. In this case, you may seek the help of a person who understands Joomla templates and separate out the breadcrumb module to a unique position.

GD Star Rating
loading...
GD Star Rating
loading...
Joomla: Hide breadcrumb on the Home page10.0102
  • Share/Bookmark

Discussion

One comment for “Joomla: Hide breadcrumb on the Home page”

  1. thank you

    GD Star Rating
    loading...

    Posted by coba | February 24, 2010, 4:32 pm

Post a comment

Overslept last night to keep my eyes open for a long meeting at UNESCO. But still wish to have a power nap before the meeting ;)
28 minutes ago, comment
Your brain may be overflowing with new ideas today and your se... More for Leo http://twittascope.com/twittascope/?sign=5
28 minutes ago, comment
For the fans RT @wordpress WordPress personas for Firefox: http://short.to/1goju
3 hours ago, comment
Hit by Twitter rate limit in a project. Requested client 2 fill http://tinyurl.com/ye6zwrh Within 24 hrs got mail: 20K requests/hr in 48 hrs
3 hours ago, comment
New blog post: Drupal 6: Different Page Templates for different Content Types http://bit.ly/bfX1yc
3 hours ago, comment