Better use of breadcrumbs in SuiteDesk

This commit is contained in:
Manuel Cillero 2017-09-01 06:58:16 +02:00
parent 6c766c0cfb
commit b3f2e096e1
29 changed files with 62 additions and 57 deletions

View file

@ -369,10 +369,19 @@ function zuitedesk_preprocess_block(&$vars, $hook) {
* Override theme_breadcrumb().
*/
function zuitedesk_breadcrumb($breadcrumb) {
if (count($breadcrumb) > 2) {
array_shift($breadcrumb);
return '<div class="breadcrumb">'. implode(' / ', $breadcrumb) .'</div>';
// When no breadcrumb:
if (count($breadcrumb) == 0) {
return '';
}
// No breadcrumb in home page and user tabs:
if (arg(0) == 'user') {
return '';
}
// No breadcrumb if it's only one link to home page:
if (count($breadcrumb) == 1 && strpos($breadcrumb[0], '>' . t('Home') . '<') > 0) {
return '';
}
return '<div class="breadcrumb">'. implode(' / ', $breadcrumb) .'</div>';
}
/**