First, tnx for the good theme! I'm working on a own modification. Maybe it's an idea to open a topic for showcasing sky-mods?

In page.tpl.php i modified the text before the breadcrumb:
line 36
if ($breadcrumb):

For some reason, i get an enter between the text and the breadcrumb? Ho can i avoid this?

Comments

jacine’s picture

Hi Lenn-art,

The $breadcrumb variable prints like this:
<div class="breadcrumb"><div class="breadcrumb"><a href="/">Home</a></div></div>

So, anything you put before it will print like this:
Your text <div class="breadcrumb"><div class="breadcrumb"><a href="/">Home</a></div></div>

And <div> tags go on new lines by default.

Hope this helps.

:)

MatthijsG’s picture

Ah ... no :?

Why's there twice

jacine’s picture

Category: support » bug
Status: Active » Needs work

There actually shouldn't be a <div> in page.tpl.php. That's my mistake. I've marked it as a bug and will take it out in the next version.

As for the 2nd div, the $breadcrumb variable, this is handled by Drupal. See the API for details:
http://api.drupal.org/api/function/theme_breadcrumb/5

:o)

MatthijsG’s picture

Title: Why an enter between text & breadcrumb? » Modifying the breadcrumb

Ah! Many, many tnx! ***

Especially the link to the API. I never realized that this function was also described in the API.

I removed the div's in the page.tpl.php AND in theme.inc, so my code is now like below. I get a nice message before the breadcrumb (in Dutch). See it for yourself (and the mod i'm working on, titled sky-red) http://tinyurl.com/2feav9

Because now my problem is solved, i changed the title so others can find this topic better.

page.tpl.php

...
      <div id="content">
        <?php if ($breadcrumb): ?>
        <?php print "U bent hier: ".$breadcrumb."<hr>"; ?>
        <?php endif; ?>
 ...

theme.inc

function theme_breadcrumb($breadcrumb) {
  if (!empty($breadcrumb)) {
    return  implode(' » ', $breadcrumb) ;
  }
}

*=(insert worship smiley here)

MatthijsG’s picture

Quicker link to see the new breadcrumb in action http://tinyurl.com/yr4pk4

jacine’s picture

Status: Needs work » Fixed

Hi Lenn-art,

You're welcome!

I also just wanted to let you know this issue has been fixed, and it's available in the latest version 5.x-1.7.

Nice job on your site... It looks good!

Thanks again for bringing this to my attention.

:)

jacine’s picture

Oh, and by the way, what you suggested above is not recommended. The way to properly take care of the issue is to override the theme function in the theme's template.php file. You are urged never to update the core files, as when you apply updates, your changes will be lost.

To learn how to do override theme functions, you may want to watch this screencast by Matt Westgate and the Drupal Dojo team. It's called Theming Like a Pro. Towards the end of the lesson, I believe he goes through the breadcrumb function as an example. I hope you find it useful.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.