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:
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.
Email This Post
⋅
Print This Post
⋅
Post A Comment
@shekharg
thank you
loading...