You are here

function _custom_breadcrumbs_allowed_display in Custom Breadcrumbs 6.2

Same name and namespace in other branches
  1. 7.2 custom_breadcrumbs_common.inc \_custom_breadcrumbs_allowed_display()

Determines if a view display is appropriate for assigning a custom breadcrumb.

Parameters

$display: The view $display object.

Return value

TRUE if the display should be considered for a custom breadcrumb, FALSE otherwise.

4 calls to _custom_breadcrumbs_allowed_display()
custom_breadcrumbs_paths_views_pre_render in custom_breadcrumbs_paths/custom_breadcrumbs_paths.module
Implements hook_views_pre_render().
custom_breadcrumbs_taxonomy_views_pre_render in custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.module
Implements hook_views_pre_render().
custom_breadcrumbs_views_form in custom_breadcrumbs_views/custom_breadcrumbs_views.module
Form builder; Displays an edit form for a views breadcrumb.
custom_breadcrumbs_views_views_pre_render in custom_breadcrumbs_views/custom_breadcrumbs_views.module
Implements hook_views_pre_render().

File

./custom_breadcrumbs_common.inc, line 68
Common helper functions used by custom breadcrumbs submodules.

Code

function _custom_breadcrumbs_allowed_display($display) {
  $allowed_display_types = array(
    'page',
    'calendar',
    'image_gallery',
  );
  if (in_array($display->display_plugin, $allowed_display_types)) {
    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;
}