/** * Return a themed breadcrumb trail. * * @param $breadcrumb * An array containing the breadcrumb links. * @return * A string containing the breadcrumb output. */ function zen_breadcrumb($breadcrumb) { // Determine if we are to display the breadcrumb. $show_breadcrumb = theme_get_setting('zen_breadcrumb'); if ($show_breadcrumb == 'yes' || $show_breadcrumb == 'admin' && arg(0) == 'admin') { // Optionally get rid of the homepage link. $show_breadcrumb_home = theme_get_setting('zen_breadcrumb_home'); if (!$show_breadcrumb_home) { array_shift($breadcrumb); } // Return the breadcrumb with separators. if (!empty($breadcrumb)) { $breadcrumb_separator = theme_get_setting('zen_breadcrumb_separator'); $trailing_separator = $title = ''; if (theme_get_setting('zen_breadcrumb_title')) { $trailing_separator = $breadcrumb_separator; $title = menu_get_active_title(); } elseif (theme_get_setting('zen_breadcrumb_trailing')) { $trailing_separator = $breadcrumb_separator; } return '<div class="breadcrumb">' . implode($breadcrumb_separator, $breadcrumb) . "{$trailing_separator}{$title}</div>"; } } // Otherwise, return an empty string. return ''; }
/** * Implementation of theme_breadcrumb(). */ function dynamo_breadcrumb($breadcrumb) { if (!empty($breadcrumb)) { // Remove the last, empty item from the breadcrumb trail. if (end($breadcrumb) == NULL) { array_pop($breadcrumb); } // Append the page title to the breadcrumb. $breadcrumb[] = menu_get_active_title(); $output = '<div id="path">' . t('You are here:'); $output .= ' <div class="breadcrumb">' . implode(' » ', $breadcrumb) . '</div>'; $output .= '</div>'; return $output; } }
/** * Return a themed breadcrumb trail. * * @param $breadcrumb * An array containing the breadcrumb links. * @return * A string containing the breadcrumb output. */ function lullacog_breadcrumb($breadcrumb) { // Determine if we are to display the breadcrumb. $show_breadcrumb = theme_get_setting('zen_breadcrumb'); if ($show_breadcrumb == 'yes' || $show_breadcrumb == 'admin' && arg(0) == 'admin') { // Optionally get rid of the homepage link. $show_breadcrumb_home = theme_get_setting('zen_breadcrumb_home'); if (!$show_breadcrumb_home) { array_shift($breadcrumb); } // Return the breadcrumb with separators. if (!empty($breadcrumb)) { $image_path = theme_get_setting('zen_breadcrumb_img'); $use_image = !empty($image_path) && is_file($image_path); $breadcrumb_separator = $use_image ? theme('image', $image_path) : theme_get_setting('zen_breadcrumb_separator'); $trailing_separator = $title = ''; if (theme_get_setting('zen_breadcrumb_title')) { $trailing_separator = $breadcrumb_separator; $title = '<span class="breadcrumb-title">' . menu_get_active_title() . '</span>'; } elseif (theme_get_setting('zen_breadcrumb_trailing')) { $trailing_separator = $breadcrumb_separator; } return '<div class="breadcrumb">' . implode($breadcrumb_separator, $breadcrumb) . "{$trailing_separator}{$title}</div>"; } } // Otherwise, return an empty string. return ''; }
function forestethics_breadcrumb($variables) { $breadcrumb = $variables['breadcrumb']; if (!empty($breadcrumb)) { // // Adding the title of the current page to the breadcrumb. $breadcrumb[] = menu_get_active_title(); //drupal_get_title(); // // Provide a navigational heading to give context for breadcrumb links to // // screen-reader users. Make the heading invisible with .element-invisible. $output = '<h2 class="element-invisible">' . t('You are here') . '</h2>'; $output .= '<div class="breadcrumb">' . implode(' » ', $breadcrumb) . '</div>'; return $output; } }
/** * Update breadcrumbs */ function stability_breadcrumb($variables) { $breadcrumb = $variables['breadcrumb']; if (!empty($breadcrumb)) { if (!drupal_is_front_page() && !empty($breadcrumb)) { $node_title = filter_xss(menu_get_active_title(), array()); $breadcrumb[] = t($node_title); } if (count($breadcrumb) == 1) { $breadcrumb = array(); } return strip_tags(theme('item_list', array('items' => $breadcrumb, 'attributes' => array('class' => array('breadcrumb')))), '<ul><li><a>'); } }
/** * Breadcrumb. */ function hoteldiamond_breadcrumb($variables) { $breadcrumb = $variables['breadcrumb']; $crumb_arrow = '<span class="crumbs-arrow"> » </span>'; if (!empty($breadcrumb)) { $arr_crumbs = array(); array_push($arr_crumbs, '<span class="crumbs">' . implode($crumb_arrow, $breadcrumb) . '</span>'); $output = '<h2 class="element-invisible">' . t('You are here') . '</h2>'; $array_size = count($arr_crumbs); for ($i = 0; $i < $array_size; $i++) { if ($i == $array_size - 1) { // Menu link title may override the content title menu_get_active_title() ? $current_crumb = menu_get_active_title() : ($current_crumb = drupal_get_title()); // If current page is 'Edit Page' if (substr(drupal_get_title(), 0, 18) == '<em>Edit Page</em>') { $current_crumb = 'Edit'; } $output .= $arr_crumbs[$i] . '<span class="crumbs-current">' . $crumb_arrow . $current_crumb . '</span>'; break; } $output .= $arr_crumbs[$i]; } return '<div class="breadcrumb">' . @$output . '</div>'; } }
function wistar_breadcrumb( $breadcrumb, $include_self = true) { global $authoritative_breadcrumbs; $drupal_title = drupal_get_title(); if ( !empty($breadcrumb) ) { if( $include_self && !$authoritative_breadcrumbs) { // get the title $title = menu_get_active_title(); // failsafe if no title provided by menu if(!$title) $title = drupal_get_title(); if(html_entity_decode(end($breadcrumb)) != $title){ $breadcrumb[] = $title; } } if(empty($title)) $breadcrumb[] = $drupal_title; $arrow = '<img src="' . base_path( ) . path_to_theme( ) . '/images/layout/breadcrumb_divider.png" />'; array_walk($breadcrumb, 'wistar_wrap_breadcrumbs', array('arrow' => $arrow, 'last' => count($breadcrumb) - 1)); return '<div class="breadcrumb">' . implode( '', $breadcrumb ) . '</div>'; } }
<?php print theme('breadcrumb', drupal_get_breadcrumb()); ?> <div class="vertical_tab_container"> <div class="vertical_tab_elements"> <?php print theme('wistar_vertical_tabs');?> <div class="content"> <h3 class="with_borders"><?php print menu_get_active_title();?></h3> <div class="node page view"> <div class="section"> <div class="list_container"> <div class="list_filters"> <ul> <li> <span>View By Year</span> <?php print $attachment_before; ?> </li> </ul> </div> <div class="list_elements"> <?php if(is_numeric($view->args[0])):?> <h3><?php print $view->args[0];?></h3> <?php endif; ?> <ul class="list"> <?php $max = count($view->result) - 1;?> <?php foreach($view->result as $idx => $result): ?> <li class="<?php if($idx == 0): ?>first<?php elseif($idx == $max):?>last<?php endif;?>"> <div id="<?php print $result->nid; ?>" class="node"> <a class="anchor" href="<?php print url('node/' . $result->nid); ?>"> <?php print $result->node_title . ' - ' . $view->render_field('field_press_date_value', $idx); ?> </a> </div> <?php
function layoutstudio_preprocess_html(&$variables) { // Set up layout variable. $variables['layout'] = 'no-secondary-and-tertiary'; if (!empty($variables['page']['secondary_first']) or !empty($variables['page']['secondary']) or !empty($variables['page']['secondary_last'])) { $variables['layout'] = 'no-tertiary'; } if (!empty($variables['page']['tertiary_first']) or !empty($variables['page']['tertiary']) or !empty($variables['page']['tertiary_last'])) { $variables['layout'] = $variables['layout'] == 'no-tertiary' ? 'regions-all' : 'no-secondary'; } $variables['preface_class'] = 'no-preface'; if (!empty($variables['page']['preface_first']) or !empty($variables['page']['preface']) or !empty($variables['page']['preface_last'])) { $variables['preface_class'] = 'no-preface'; } $variables['postscript_class'] = 'no-postscript'; if (!empty($variables['page']['postscript_first']) or !empty($variables['page']['postscript']) or !empty($variables['page']['postscript_last'])) { $variables['postscript_class'] = 'no-postscript'; } // Compile an array of classes that are going to be applied to the body element. // This allows advanced theming based on context (home page, node of certain type, etc.). // Random body class $random = theme_get_setting('layoutstudio_random_class'); if ($random > 1) { $variables['classes_array'][] = 'random-' . rand(1, $random); } // Current active menu item $variables['classes_array'][] = 'menu-item-' . drupal_clean_css_identifier(drupal_strtolower(menu_get_active_title())); // Add information regarding the secondary & tertiary. if ($variables['layout'] == 'regions-all') { $variables['classes_array'][] = 'regions-all'; } elseif ($variables['layout'] == 'no-secondary-and-tertiary') { $variables['classes_array'][] = 'no-secondary-and-tertiary'; } else { $variables['classes_array'][] = $variables['layout']; } $variables['classes_array'][] = $variables['preface_class']; $variables['classes_array'][] = $variables['postscript_class']; if (!$variables['is_front']) { // Add unique classes for each page and website section $path = drupal_get_path_alias($_GET['q']); $section = arg(0); $sub_section = arg(1); $variables['classes_array'][] = 'section-' . $section; $variables['classes_array'][] = 'sub-section-' . ($sub_section ? $sub_section : 'none'); if (arg(0) == 'node') { if (arg(1) == 'add') { if ($section == 'node') { array_pop($variables['classes_array']); // Remove 'section-node' array_pop($variables['classes_array']); // Remove 'section-node' } $variables['classes_array'][] = 'section-node-add'; // Add 'section-node-add' } elseif (is_numeric(arg(1)) && (arg(2) == 'edit' || arg(2) == 'delete')) { if ($section == 'node') { array_pop($variables['classes_array']); // Remove 'section-node' array_pop($variables['classes_array']); // Remove 'section-node' } $variables['classes_array'][] = 'section-node-' . arg(2); // Add 'section-node-edit' or 'section-node-delete' } } } // Add classes based on the role(s) of the current user global $user; foreach ($user->roles as $role) { $variables['classes_array'][] = "role-" . drupal_clean_css_identifier($role); } }
/** * get_active_title * * Gets the active menu title for the current page. If there is an ablecore_menu override, * it defaults to the title of the current page. * * @return bool|null|string */ public static function get_active_title() { if (module_exists('ablecore_menu') && ablecore_menu_get_active_title() !== false) { return ablecore_menu_get_active_title(); } else { return menu_get_active_title(); } }
/** * Implements theme_breadcrumb(). */ function unl_fourone_og_breadcrumb($variables) { if ($group = unl_fourone_og_get_current_group()) { $node = menu_get_object(); if ($group->nid !== unl_fourone_og_get_front_group_id() && isset($node) && $node->type == 'group') { array_pop($variables['breadcrumb']); // At this point, on a group homepage the breadcrumb trail should consist of one item: Home // This is sort of a hack below for cases where the group homepage is somewhere in a menu and an extra breadcrumb is being added. if (count($variables['breadcrumb']) == 2) { array_pop($variables['breadcrumb']); } } } if (count($variables['breadcrumb']) == 0) { $variables['breadcrumb'][] = '<a href="' . url('<front>') . '">' . check_plain(unl_fourone_get_site_name_abbreviated()) . '</a>'; } else { // Change 'Home' to be $site_name array_unshift($variables['breadcrumb'], str_replace('Home', check_plain(unl_fourone_get_site_name_abbreviated()), array_shift($variables['breadcrumb']))); } //Add the intermediate breadcrumbs if they exist $intermediateBreadcrumbs = theme_get_setting('intermediate_breadcrumbs'); if (is_array($intermediateBreadcrumbs)) { krsort($intermediateBreadcrumbs); foreach ($intermediateBreadcrumbs as $intermediateBreadcrumb) { if ($intermediateBreadcrumb['text'] && $intermediateBreadcrumb['href']) { array_unshift($variables['breadcrumb'], '<a href="' . $intermediateBreadcrumb['href'] . '">' . check_plain($intermediateBreadcrumb['text']) . '</a>'); } } } // Prepend UNL array_unshift($variables['breadcrumb'], '<a href="http://www.unl.edu/">UNL</a>'); // Append title of current page -- http://drupal.org/node/133242 if (!drupal_is_front_page()) { if ($group = unl_fourone_og_get_current_group()) { $node = menu_get_object(); if ($group->nid !== unl_fourone_og_get_front_group_id() && isset($node) && $node->type == 'group') { $group_alias = drupal_get_path_alias('node/' . $node->nid); $group_name = $node->title; } } $variables['breadcrumb'][] = (isset($group_alias) ? '<a href="' . $group_alias . '">' : '') . (isset($group_name) ? $group_name : check_plain(menu_get_active_title())) . (isset($group_alias) ? '</a>' : ''); } $html = '<ul>' . PHP_EOL; foreach ($variables['breadcrumb'] as $breadcrumb) { $html .= '<li>' . $breadcrumb . '</li>' . PHP_EOL; } $html .= '</ul>'; return $html; }
">Home /</a> <?php if (!empty($categoryName)) { ?> <a href="?q=taxonomy/term/<?php echo $active_trail[1]["map"][1]->field_category["und"][0]["taxonomy_term"]->tid; ?> "><?php echo $categoryName; ?> </a> <?php } else { ?> <span><?php echo menu_get_active_title(); ?> </span> <?php } ?> </div> <!-- ---------------------- end show breadcumb in second tempalte ---------------------- --> <?php if ($tabs) { ?> <div class="tabs"> <?php print render($tabs); ?>
/** * Update breadcrumbs */ function hasta_breadcrumb($variables) { $breadcrumb = $variables['breadcrumb']; if (!empty($breadcrumb)) { if (!drupal_is_front_page() && !empty($breadcrumb)) { $node_title = filter_xss(menu_get_active_title(), array()); $breadcrumb[] = t($node_title); } if (count($breadcrumb) > 1) { $output = '<div class="pagenation_links">'; $output .= implode(' <i> / </i> ', $breadcrumb); $output .= '</div>'; return $output; } } }