0

Hello i asked this on stackoverflow and was refered to here. I hope you dont mind me copying and pasting it. thanks

Hello i don't really know where to ask this on drupal so i hope you all don't mind me asking it here on your fine site. Everything ive asked before has been resolved by your good selves so i thought i'd give you a try on this. Thanks.

I was hoping to just hide my breadcrumb when viewing the taxonomy term view created by Views. I do use Custom Breadcrumbs module but from what ive read that just edits the output and not the breadcrumb appearing or not. Here's an example of my view- http://onlinebanter.com/general-chat

As you can see it's pushing the centre of my page down so as it isnt lined up with the sidebar. I dont really need it in these views. All help appreciate from your vast combined knowledgebase.

Thanks

Reg

0

This is easily done with a little bit of theming. Based on the page being displayed, you can unset the $breadcrumb template variable to suppress output of the breadcrumbs on that particular page.

Pop a function like this simple example into YOUR_MODULE's template.php:

function YOUR_MODULE_preprocess_page(&$vars) {
  if ($_GET['q'] == 'general-chat') {
    unset($vars['breadcrumb']);
  }
}
| improve this answer | |
  • Ah thanks very much Jan much appreciated. The problem that this would create for me though is that i have many many taxonomy terms. Would i be able to override it based on the path taxonomy/term/* Again i appreciate your input. Thanks – Reg Gordon Aug 3 '11 at 5:30
  • ps the above works great on a specific page. Thanks – Reg Gordon Aug 3 '11 at 5:36
  • It's just a matter of condition you use. To make it apply for taxonomy pages, just change it to something like if (arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2))). – Jan Tomka Aug 3 '11 at 5:38
  • Alternatively Jan i think i would only like the breadcrumb to appear on nodes. would that be easier to code you think? thanks – Reg Gordon Aug 3 '11 at 5:44
  • ooops sorry Jan i missed you there. I will go try what you suggested. I am just gonna replace general-chat with the code you posted. Ive been working with drupal for about 4 years now and i am picking it up but my php knowledge is lacking. Im too old and a bit dim to study it :( – Reg Gordon Aug 3 '11 at 5:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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