diff --git a/sites/all/themes/unl_wdn/html.tpl.php b/sites/all/themes/unl_wdn/html.tpl.php index 85eb110f9ae3cd40c79ab33ea2863821a408cda3..dfd532d8329f4f4c3661dd19df87b0892d3c2c72 100644 --- a/sites/all/themes/unl_wdn/html.tpl.php +++ b/sites/all/themes/unl_wdn/html.tpl.php @@ -38,6 +38,7 @@ $t->head .= PHP_EOL . $head . PHP_EOL . $styles . PHP_EOL . $scripts . PHP_EOL + . '<link href="' . url('<front>', array('absolute' => TRUE)) . '" rel="home" />' . PHP_EOL ; if (theme_get_setting('use_base')) { diff --git a/sites/all/themes/unl_wdn/template.php b/sites/all/themes/unl_wdn/template.php index fddf3caa1f7f64c8d0202e794e22ef46937fea8d..87356e7395d495b0d7238b07f99c7bc6ea612b40 100644 --- a/sites/all/themes/unl_wdn/template.php +++ b/sites/all/themes/unl_wdn/template.php @@ -19,20 +19,30 @@ require_once dirname(__FILE__) . '/includes/form.inc'; function unl_wdn_breadcrumb($variables) { $breadcrumbs = $variables['breadcrumb']; - + if (count($breadcrumbs) == 0) { - $breadcrumbs[] = unl_get_site_name_abbreviated(); + $breadcrumbs[] = '<a href="">' . unl_get_site_name_abbreviated() . '</a>'; } else { //Change 'Home' to be $site_name array_unshift($breadcrumbs, str_replace('Home', unl_get_site_name_abbreviated(), array_shift($breadcrumbs))); } + + //Add the intermediate breadcrumb if it exists + $intermediateBreadcrumbText = theme_get_setting('intermediate_breadcrumb_text'); + $intermediateBreadcrumbHref = theme_get_setting('intermediate_breadcrumb_href'); + if ($intermediateBreadcrumbText && $intermediateBreadcrumbHref) { + array_unshift($breadcrumbs, '<a href="' . $intermediateBreadcrumbHref . '">' . $intermediateBreadcrumbText . '</a>'); + } + //Prepend UNL array_unshift($breadcrumbs, '<a href="http://www.unl.edu/">UNL</a>'); //Append title of current page -- http://drupal.org/node/133242 - $breadcrumbs[] = drupal_get_title(); + if (!drupal_is_front_page()) { + $breadcrumbs[] = drupal_get_title(); + } $html = '<ul>' . PHP_EOL; foreach ($breadcrumbs as $breadcrumb) { diff --git a/sites/all/themes/unl_wdn/theme-settings.php b/sites/all/themes/unl_wdn/theme-settings.php index af12d0c93febe526628c0c385fcfad16fad0a9b1..fd65149caf890b9c9d58504fa351a0fa01a07d9c 100644 --- a/sites/all/themes/unl_wdn/theme-settings.php +++ b/sites/all/themes/unl_wdn/theme-settings.php @@ -2,24 +2,53 @@ function unl_wdn_form_system_theme_settings_alter(&$form, &$form_state) { - $form['site_name_abbreviation'] = array( - '#type' => 'textfield', + $form[] = array( + '#type' => 'fieldset', '#title' => t('Site Name Abbreviation'), - '#default_value' => theme_get_setting('site_name_abbreviation'), - '#description' => t('An abbreviated version of your site\'s name to use in breadcrumbs.') + + 'site_name_abbreviation' => array( + '#type' => 'textfield', + '#default_value' => theme_get_setting('site_name_abbreviation'), + '#description' => t('An abbreviated version of your site\'s name to use in breadcrumbs.') + ) ); - $form['zen_forms'] = array( - '#type' => 'checkbox', - '#title' => t('Use Zen Forms'), - '#default_value' => theme_get_setting('zen_forms'), - '#description' => t('Transforms all forms into the list-based zen forms.') + $form['intermediate_breadcrumb'] = array( + '#type' => 'fieldset', + '#title' => t('Intermediate Breadcrumb'), + '#description' => t('A breadcrumb that is displayed between the UNL breadcrumb and this site\'s breadcrumb'), + + 'intermediate_breadcrumb_text' => array( + '#type' => 'textfield', + '#title' => t('Text'), + '#default_value' => theme_get_setting('intermediate_breadcrumb_text'), + '#description' => t('An abbreviated version of your site\'s name to use in breadcrumbs.') + ), + + 'intermediate_breadcrumb_href' => array( + '#type' => 'textfield', + '#title' => t('URL'), + '#default_value' => theme_get_setting('intermediate_breadcrumb_href'), + '#description' => t('An abbreviated version of your site\'s name to use in breadcrumbs.') + ) ); - $form['use_base'] = array( - '#type' => 'checkbox', - '#title' => t('Use HTML Base Tag in Head'), - '#default_value' => theme_get_setting('use_base'), - '#description' => t('Adds an HTML Base tag to the <head> section with href="' . url('<front>', array('absolute' => TRUE)) . '"') + $form['advanced_settings'] = array( + '#type' => 'fieldset', + '#title' => t('Advanced Settings'), + + 'zen_forms' => array( + '#type' => 'checkbox', + '#title' => t('Use Zen Forms'), + '#default_value' => theme_get_setting('zen_forms'), + '#description' => t('Transforms all forms into the list-based zen forms.') + ), + + 'use_base' => array( + '#type' => 'checkbox', + '#title' => t('Use HTML Base Tag in Head'), + '#default_value' => theme_get_setting('use_base'), + '#description' => t('Adds an HTML Base tag to the <head> section with href="' . url('<front>', array('absolute' => TRUE)) . '"') + ) ); }