Hello!

The Image Gallery module maded through views, so we can redefine Image Gallery view in Views UI.

So we expect that when we turn on Image Gallery views, we can control Image Gallery breadcrumbs through Custom Breadcrumbs custom_breadcrumbs_views.module. But we were wrong, beacause the display_plugine of Image Gallery is not Page or Calendar, as your expects in this function:


function _custom_breadcrumbs_allowed_display($display) {

  if (drupal_substr($display->id, 0, 4)  == 'page' || drupal_substr($display->id, 0, 8)  == 'calendar') {
    if (!(isset($display->handler->view->is_attachment) && $display->handler->view->is_attachment)) {
      if (isset($display->display_options['path']) ) {
        if (module_exists('panels') && panels_get_current_page_display()) {
          return FALSE;
        }
        return TRUE;
      }
    }
  }
  return FALSE;
}

and in views list on the /admin/build/custom_breadcrumbs/views/add image path was not appear.

We suggest to made this function more clear (and this will work with Image Gallery module through views):

function _custom_breadcrumbs_allowed_display($display) {
  $allowed_display_types = array('page', 'calendar', 'image_gallery');
  
  if (!in_array($display->display_plugin, $allowed_display_types)) return FALSE;
  if (!empty($display->handler->view->is_attachment)) return FALSE;
  if (!isset($display->display_options['path'])) return FALSE;
  if (module_exists('panels') && panels_get_current_page_display()) return FALSE;
  
  return TRUE;
}

Thanks for your attention! Hope you find it useful and made function _custom_breadcrumbs_allowed_display() more flexible.

Comments

MGN’s picture

Status: Active » Fixed

Thanks. There was related patch at #721708: Use display_plugin name to identify allowed displays for custom breadcrumbs that was under review. Based on your suggestions, I've merged the issues and committed a fix to 6.x-2.x-dev in CVS. Should work with Image gallery module now, and makes it easy to add additional allowed displays when needed.

andyceo’s picture

Wow, it's great) Thanx for the quick reaction. :)

Status: Fixed » Closed (fixed)

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