// 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 page, 8.5 out of 10 based on 6 ratings
Share

Email This Post Email This Post Print This Post Print This Post Print This Post Post A Comment Tweet your comments/question to me @shekharg

Discussion

5 comments for “Joomla: Hide breadcrumb on the Home page”

  1. thank you

    Posted by coba | February 24, 2010, 4:32 pm
  2. I loved your post above and even mentioned it on joomla forum as I found it extremely helpful in my last project.

    I have a new joomla site to build and I am having issues. I have a few modules which have the menu assignment to just ‘home’. However they are still appearing on my other module pages (were I have latest news or a calendar) They are not appearing on the article pages thankfully.

    Is there any code that I could put in to say to just appear on homepage and nowhere else. Sorry to bother you but I am totally confused because this never happened on my other sites.

    Thanks
    Mairead

    Posted by Mairead | February 9, 2011, 5:48 am
  3. Hi Mairead,

    Is there any code that I could put in to say to just appear on homepage and nowhere else.

    I may not be able to help you much unless you can be more specific – with your website URL and the module(s) that you are using.

    Sorry to bother you but I am totally confused because this never happened on my other sites.

    No problem at all 🙂 If I can help, I will, for sure.

    Posted by Shekhar | February 11, 2011, 3:54 am
  4. Exclude “Home” breadcrumb from Home (default) page.

    One option is to exclude the breadcrumbs module from the Home (Default)page. The only caveat is that you will not be able to have sub menus under “Home”.

    Do:
    In joomla AQdministration (For Joomla 1.6 or 1.7)

    1. Move sub-menus under “Home” tab to another Menu Tab.
    2. Go to extensions/modulemanager and select the breadcrumbs module.
    3. in Menu Assignemt, select “Only on the pages selected (Dropdown)
    4. de-select the check boxes in the Menu that contains the breadcrumb module (i.e. Main Menu, Top…)
    5. Save
    6. Select “No” radio button for Show “You are here”
    7. Check yes in the radio button named Show Home
    8. Edit Text for home entry (or leave default)
    9. Select Yes on “Show Last”
    10 Add Text Separator (Optional)
    11 Click Save and Close.
    12 Go to siete maintenance and clear cache (if enabled)
    Finally: Go to your main Page and refresh. Test by selecting the other main menu items.

    Note: I am using beez_20 Template with Joomla 1.7. The breadcrumb poisition is “Position 2″Horizontal”
    I have not tested with Vertical Main Menu.

    Hope this helps 🙂

    Posted by Barry Gonzalez | September 24, 2011, 1:05 am
  5. For yootheme templates go to templates\template_name\layouts\template.php

    and change:

    warp->modules->count(‘breadcrumbs’)) : ?>
    warp->modules->render(‘breadcrumbs’); ?>

    getActive() === $menu->getDefault())) {
    ?>
    warp->modules->count(‘breadcrumbs’)) : ?>
    warp->modules->render(‘breadcrumbs’); ?>

    Posted by dennis | December 21, 2011, 5:22 pm

Post a comment

Recent Tweets

Follow Me on Twitter