You are here

function theme_cmis_browser_browse_breadcrumb in CMIS API 7

Same name and namespace in other branches
  1. 6.4 cmis_browser/cmis_browser.theme.inc \theme_cmis_browser_browse_breadcrumb()
  2. 6.2 cmis_browser/cmis_browser.theme.inc \theme_cmis_browser_browse_breadcrumb()
  3. 6.3 cmis_browser/cmis_browser.theme.inc \theme_cmis_browser_browse_breadcrumb()
  4. 7.2 cmis_browser/cmis_browser.theme.inc \theme_cmis_browser_browse_breadcrumb()

Theme for cmis_browser breadcrumb

Parameters

$bcarray:

2 theme calls to theme_cmis_browser_browse_breadcrumb()
cmis_browser_preprocess_cmis_browser_popup in cmis_browser/cmis_browser.theme.inc
theme_cmis_browser in cmis_browser/cmis_browser.theme.inc

File

cmis_browser/cmis_browser.theme.inc, line 125

Code

function theme_cmis_browser_browse_breadcrumb($variables) {
  $next_img = theme('image', array(
    'path' => drupal_get_path('module', 'cmis_browser') . '/images/next.gif',
  ));
  $contents = '';
  $currentpath = '';
  $contents .= '<div id="cmis-breadcrumb">';
  if (!empty($_GET['type']) && $_GET['type'] == 'popup') {
    $contents .= l('Root', 'cmis/browser' . $currentpath, array(
      'query' => array(
        'type' => 'popup',
        'caller' => $_GET['caller'],
      ),
    ));
  }
  else {
    $contents .= l('Root', 'cmis/browser' . $currentpath);
  }
  $currentpath = '';
  foreach ($variables['bcarray'] as $space) {
    $contents .= $next_img . ' ';
    $currentpath .= '/' . $space;
    if (!empty($_GET['type']) && $_GET['type'] == 'popup') {
      $pagelink = l($space, 'cmis/browser' . $currentpath, array(
        'query' => array(
          'type' => 'popup',
          'caller' => $_GET['caller'],
        ),
      ));
    }
    else {
      $pagelink = l($space, 'cmis/browser' . $currentpath);
    }
    $contents .= $pagelink;
  }
  $contents .= '</div>';
  return $contents;
}