By looklively on
Hi,
I want to add 'You are here' to the the breadcrumbs.
Like so;
<?php if ($breadcrumb): ?>
<div id="breadcrumb">You are here:<?php print $breadcrumb; ?></div>
<?php endif; ?>
But no matter how and where I have put it the line insists on breaking.
How can I do this without this happening?
Thanks.
Comments
The breadcrumb is wrapped in
The breadcrumb is wrapped in a div (which is going to line break).
You'll need to adjust your theme css. Wrap the whole thing in another div:
then add this to your theme style.css file.
#breadcrumb{
display:inline;
}
Thanks Matt for the
Thanks Matt for the reply.
That doesn't seem to work tho.
When you say wrap the whole thing in another div ... you have simply changed the id of the div that was already there.
The css rule you have put uses the first id tho.
Sorry but I don't get it.
Override the breadcrumb theme
Hi there,
What you can do here is override the built-in breadcrumb template. In your template's folder, there should be a file called template.php (and if there's not, you can safely create one). Place this function inside of it - you can tailor it further to suit your needs:
Then, in your page.tpl.php, all you need to do is:
(Note that if you already have a template.php file, look for an existing function called phptemplate_breadcrumb() - if there is one, just comment it out and replace with the above.)
Hope that helps!
That did the trick
That did the trick nicely.
A little minor tailoring to accommodate my template and job done.
Thanks both for the help.
It doesn't work for me !
Hi,
I tried your method but it doesn't work.
Instead of :
You are here: home > Mypage > ...
I have :
You are here: Array
Have you got an idea ?
Thanks.
I tried both of the above...No luck.
After trying both of these, I threw in some of my own code to the page.tpl.php file. I am not an advanced programmer, but it worked.
I made sure the following was in my page.tpl:
And then I added the following into my style.css file for my theme:
It works!
I am using the acquia marina theme on Drupal 6.10, and all you need to do is add "#breadcrumb " before ".breadcrumb" and add the "display:inline" to it.
or you could pimp your breadcrumbs with a little....
i do the following to add a little emphasis to the last item in the breadcrumb. this underlines and makes the last breadcrumb a little darker than the rest.
EDIT to my previous post
I apologize for just now seeing it, but make sure you add the css code to your local.css if you are using Acquia Marina theme. If you don't then when you update you will have to add it again. If you have another theme, then I would suggest doing the same setup, i.e. using a local.css as opposed to directly altering your style.css. If you have built your own theme, then you're just outside my "expertise", lol.