2

I'd like to remove the breadcrumb from the frontpage and haven't been able to find a solution in the configuration settings of the theme or custom breadcrumbs. So I am thinking of modifying the page.tpl.php

Do you see a problem with this?

Replace:

<?php print $breadcrumb; ?>

With:

<?php if ($_GET["q"] == variable_get("site_frontpage",
"node")){}
else if ($breadcrumb) {print $breadcrumb;} ?>

1 Answer 1

3

You don't have to do it the hard way. There is a variable (bool) $is_front that you can use in this case.

<?php if (!$is_front && $breadcrumb) {
  print $breadcrumb;
}
?>

You can read more about page.tpl.php variables here.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.