i tried to search on this but i couldn't really find what i'm looking for..
Lets say i have "section" page.. Let's call it "About Us"
When you click on that page.. i think it looks kind of dumb to have a breadcrumb that simply says:
Home
Now if you click on a page/node underneath "About Us", lets say "History", the breadcrumb now looks like:
Home > About Us
That's Looks better to me and makes more sense... (although i probably wouldn't mind getting rid of the Home here as well)..
Is there anyway to either:
1) globally remove 'Home" from ALL breadcrumbs
2) specifically remove 'Home' on breadcrumbs of certain pages
And as a side question:
3) Is there any way to include the current page/node being viewed as the last "crumb" in the breadcrumb traill?
I'm no expert on breadcrumbs but it kind of makes sense to me to do it this way.
FWIW.. i'm using category module and category menu. This may have an effect on my breadcrumbs are being displayed and or how they can be configured or themed
thanks in advance
Comments
=-=
look into the advanced_menu.module which allows you to extend the breadcrumbs to be this way Home > About Us
to remove home from the breadcrumb trail may take some theme override.
Removing the breadcrumb on the home page
Hi there-
Though I can't help you get rid of home on all the pages, I can at least take it off the main page for you.
Go to your page.tpl.php file, and find the line:
<?php if ($breadcrumb): print $breadcrumb ?><?php endif; ?>Edit this line to instead be:
<?php if ($breadcrumb && $title != "What you called your home page"): print $breadcrumb ?><?php endif; ?>Hope that helps.
Try this on for size (Drupal 5.1)
Edit: You can check out my article at: http://sensiblysecular.com/drupal/hiding_home_link_in_breadcrumb/
If your using PHPTemplate, here is some stuff you can try...
A crack at the breadcrumbs, in-template statement
Inside: page.tpl.php in your theme folder
Find (if exists):
or Find:
print $breadcrumbReplace with:
If $breadcrumb on a page returns one of these examples:
The $breadcrumb will not print.
If $breadcrumb on a page returns one of these examples:
The $breadcrumb will show. The first and last are likely to occur with phptemplate_breadcrumb($breadcrumb) is overridden or a module interfering with breadcrumbs. Back in real life, drupal setup's often include many modules which may trigger this extraneous result. So we look for a fix.
A cooler way
Inside: template.php in your theme folder
I have made a function override for phptemplate_breadcrumb($breadcrumb). This override grants some flexibility, and best of all you can stick keep your old
print $breadcrumbfunction call in page.tpl.php. Inside your theme's directory find template.php (if it isn't there, create it.) Paste this function in:Remember, this function override is not meant to be coupled with the first example in page.tpl.php
print $breadcrumbto call your breadcrumbs.
works in 6.6?
I am rebuilding off-line from 4.6 to 6.6. I plugged this into the Marinelli theme and it seems to work. Thanks for sharing!
Remove Home Breadcrumb if Only Home
hide home completely
is there a way to hide "home" completely on every page?
thanx
Yes
There is a way for your requirement:
function phptemplate_breadcrumb($breadcrumb) {
array_shift($breadcrumb);
if (!empty($breadcrumb)) {
return '
';
}
}
worked for me
I used this in template.php for the site theme, just copied and pasted at the bottom, and it worked for me - after I cleared the site's cache. This turns it off everywhere which is what I wanted.
thanks for this
this worked really good for me, except that now all breadcrumbs have "?" rather than ">>" can anyone help?
Nicolas
-------------------------
"?" rather than ">>
This often happens when cutting and pasting code via a broswer. Re-type the '>' in a plain text editor or look up the ASCI code for the character you'd like to use. This should fix this for you.
I know its late...
...but better late than never, thanks!
Nicolas
-------------------------
This worked for me
I used this in the template.php file to remove whatever the "first" item in the breadcrumb is. Hope it helps
Still works for drupal 5
This is what worked for me, on Drupal 5.
Amnon
have an update for that on
have an update for that on drupal 5.9?
=-=
what errors are you getting that don't allow it to work on 5.9 ?
thanks for that, it works
thanks for that, it works perfectly for me ;)
Worked for me in 6.3.
This solution a few posts above works for me in 6.3.
To remove home sitewide but not necessarily the first breadcrumb
This solution worked, but on pages like 'About' you would lose the breadcrumb simply because it was first. I only needed the 'Home' to be removed to this is what worked for me.
Works in Drupal 6.13
The above solution worked for me on a Drupal 6.13 installation.
Why not simplify?
Why not just:?
Agileware are a team of local Drupal developers in Australia, https://agileware.com.au
Agileware support and host Drupal, CiviCRM and WordPress websites.
Contact Agileware today at https://agileware.com.au/contact
Thanks, jriddiough
Thanks, jriddiough. Worked perfectly.
Hi @jriddiough this
Hi @jriddiough this worked fine in Drupal 6.16, Many Thanks!
Contact me for drupal projects in English, German, Italian, Drupal Hosting Support.
Update for 6.x
For those finding this by searching, as I did - Note that http://drupal.org/project/menu_breadcrumb does this now with no (extra) code.
no it doesn not do what ppl
no it doesn not do what ppl were asking for, just part of it.
Adriadrop Drupal development
Great
Actually this solution above really helped me. Thank you!
Updated to D7
Update/FYI: both these modules now has D7 releases:
http://drupal.org/project/menu_breadcrumb
http://drupal.org/project/taxonomy_breadcrumb
Removing home link - thanks!
Hi jriddiough - your solution (removing only the "home" link in the breadcrumb) is just what I was looking for and works like a charm - thanks!
Hye jriddiough, I'm newbie to
Hye jriddiough,
I'm newbie to the drupal and I have been playing with the drupal for few couple of week. Before that I worked with Zend-Framework,Oscommerce,Moodle-online course management system.
Today, I created some nodes of type 'page' to taste the drupal CMS and I found that when browser renders those page, it also presents the 'Home'-root of the drupal breadcrumb.And it looks awkward as it appears top of the each page.
So all of sudden, I deleted the $breadcrumb from the page.tpl.page but then I got a question what if some page needs to have breadcrumb.So this is not the good practice ever.
So finally, I reached here and grabbed this place and now everything goes well.
Thanks for leading to the end of the tunnel and to lighten the lamp to eliminate the darkness
I have tried everything i can
I have tried everything i can find on these breadcrumbs.. nothing works to remove the single 'home' link. Is this some kind of bug that needs to be filed someplace? Maybe there is a way to tell custom breadcrumbs to NOT display by content type? I have tried the php visible false thing , and that don't work either... maybe we are just suppose to not use any breadcrumbs at all..........In fact, none of the php code in this tread seems to work either. I don't get it...drupal is suppose to be ahead of it's time, maybe the breadcrumbs are from the past...don't know
custom breadcrumbs 2.0
This is now possible in the 6.x-2.x-dev version of custom_breadcrumbs
There is a global configuration for setting the text of the Home breadcrumb, and you can also just eliminate it. To add it back in on some pages, node-types, views, taxonomy-pages, or at specific paths, you'll just add Home (or whatever text you want) as the first title in the breadcrumb.
For the title of the page (node) being viewed, just use the [title] token (provided by the Token module).
This version is still in development, but ready for testing.
that sounds great but it just
that sounds great but it just doesn't work for me.
see my post in the custom breadrcrumbs issue queue at http://drupal.org/node/407052#comment-1892310
the php function from the above post http://drupal.org/node/103174#comment-1756386 (thank you!) is what i used not to print the "Home" crumb by default.
MGN's reply here
MGN's reply here http://drupal.org/node/407052#comment-1893964 actually solved the problem with and within custom breadcrumbs module.
.
I have switched to the dev version of custom breadcrumbs and it's really great. All my issues with breadcrumbs seem to be solved now, life is good..
Hide Home link
There is one more way of doing this. I suppose u want to hide the Home link from your web-page.
This can be done via CSS. where u can set the display property as None. (display:none).
This is Drupal 6, but similar
This is Drupal 6, but similar issue. Views was insistently tacking on its own breadcrumb to my Custom Breadcrumbs trail (may be because CB is still dev version?), so I added this function to template.php to remove any specific string:
Drupal 7
Hi Mike Milano, Thanks. I
Hi Mike Milano,
Thanks. In the above code I just replaced 'phptemplate' with my 'themename'.(according to this) and it works. Again thanks for the code.
Rgrds,
Deepika.
If you just want to hide the
If you just want to hide the home link the following will work in Drupal 7:
Change phptemplate to your themes name.
did;t work with me in d7 exactly . so this is how i modified.
You can use Custom breadcrumbs 2.x version now
Custom breadcrumbs 2.x is very powerful, a series ofsub-modules help to to custom any styles and also remove the 'Home' link.
Drupal Solution Architect
Where do you put the code in
Where do you put the code in D7?
I tried to put it in template.php but i get a syntax error. That's why I assume that I should put it somewhere else :)
/Anna
=-=
which code did you use? there are multiple snippets through out this thread?
if from http://drupal.org/node/103174#comment-4807468 , it does go in template.php however, I'd change the function name from phptemplate to yourthemename
Yes, I used the one you
Yes, I used the one you linked to. I changed the name aswell, but it still does not work. I get a syntax error for the < that starts the code.
=-=
did you remove the opening and closing php tags? they aren't needed in template.php. They are included in the comment to trigger the code filter.
No I didn't (wasn't aware of
No I didn't (wasn't aware of that).
Tried the code again, and removed the <? in the top and bottom.
The error message is gone, but the code is not working. I cleared the cache, but nothing happend.
Some problem here. I rename
Same problem here. I renamed the phptemplate with my theme's name but nothing happened.
I removed the php tags and it doesn't recognize it as php code..
Any advice?
=-=
it is imperative to understand which version of drupal is in use to know whether or not you are using the correct code. It is also imperative to understand which code you are actually using.
if D7 see: http://api.drupal.org/api/drupal/includes--theme.inc/function/theme_brea... for the correct function and manipulate as needed.
My solution to hide breadcrumbs if only "Home" is showing
D7
See http://drupal.org/node/103174#comment-6260120
Found the fix after a while
If you have path breadcrumbs module installed. Go to structure > Path breadcrumbs > path breadcrumbs settings, then check the "Hide breadcrumbs navigation for single breadcrumb", save configuration, refresh page. Done.