hi all,
I don't know what I'm doing wrong in this module. I simply want to add breadcrumbs for one type of nodes, created by CCK module - it's called 'Galeria', for this I want to add a breadcrumb called 'Galerie' and path 'www.example.com/galerie' where I have a view with list of 'Galeria' type nodes. I create a custom breadcrumb as shows an attached image, but after saving nothing show up in 'Galeria' nodes, there is only a 'Home' breadcrumb as before.
I tried to clear theme cache and also my browsers cache and still nothing.
I'm using drupal 6.14
Please help

CommentFileSizeAuthor
custom_breadcrumbs_edit.jpg52.13 KByachuu

Comments

yachuu’s picture

I figured out that this is some sort of problem with my theme called Energetic
now I try to solve the problem...

yachuu’s picture

ok, i found the solution:
energetic theme use following function to get $breadcrumb variable:

function energetic_breadcrumb($breadcrumb) {
  $breadcrumb = menu_get_active_breadcrumb();
  if (!empty($breadcrumb)) {
    return '<div class="breadcrumb">' . implode(' | ', $breadcrumb) . '</div>';
  }
}

problem is with function menu_get_active_breadcrumb();
when I comment this line custom breadcrumbs start working

so I think this function do not use custom breadcrumb module settings - I don't know it's proper situation, maybe energetic theme creators make mistake using this function, do they?
close this issue if you want to

MGN’s picture

You are correct, menu_get_active_breadcrumb() sets the breadcrumb based on the (menu) active trail and custom breadcrumbs 6.x-1.x does not set the active trail.

Custom breadcrumbs uses drupal_set_breadcrumb to set the breadcrumb. Themes can then use drupal_get_breadcrumb to retrieve the breadcrumb and format/display it.

Try replacing menu_get_active_breadcrumb() with drupal_get_breadcrumb() and see if it works correctly.

Note that drupal_get_breadcrumb() falls back to menu_get_active_breadcrumb() if the breadcrumb has not been set with drupal_set_breadcrumb(), so *I think* it ought to work as the theme developers intended - but I am not sure about this.

MGN’s picture

Title: breadcrumbs don't want to show » breadcrumbs don't want to show with Energetic Theme
MGN’s picture

Status: Active » Fixed

Marking this as fixed, since the question was answered.

Status: Fixed » Closed (fixed)

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