Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
http://getbootstrap.com/components/#breadcrumbs uses the active page title as last element in breadcrumb.
Patch adds active crumb via drupal_get_title()
Comments
Comment #1
markhalliwellAlready committed.
I'm not entirely sure we want to do this here. There are modules that can modify the breadcrumbs (including adding the active (current page) at the end. Maybe it should be done in preprocess first?
Comment #2
valkum CreditAttribution: valkum commentedDid a bit of work. Looked ad Zen theme and added some settings.
* Show Breadcrumbs or not or only on admin section
* Show Home Link or not
* Add content title
Comment #3
markhalliwellWhitespace at EOL.
I'd rather keep all "bootstrap" settings in one fieldset personally. I don't like having things split out when they're so few settings.
Comment #4
valkum CreditAttribution: valkum commented* removed whitespace
* moved settings into 'bootstrap' fieldset
Comment #5
markhalliwellAdd an extra set of parenthesis around the second condition:
if ($show_breadcrumb == 'yes' || ($show_breadcrumb == 'admin' && arg(0) == 'admin')) {
Anyway to get
#states
implemented here that way the checkboxes are hidden if "No" is selected? Also the extra['breadcrumb_options']
key is no longer needed..info
file.Comment #6
valkum CreditAttribution: valkum commentedComment #7
valkum CreditAttribution: valkum commentedComment #8
markhalliwellDidn't notice this till just now (sorry). Let's keep the keys integers (easier to manage):
Forgot to take out debug.
Minor, but has more semantic impact if we just rename
$show_breadcrumb
to$bootstrap_breadcrumb
.I would put in the following
#description
here:"If your site has a module dedicated to handling breadcrumbs already, ensure this setting is enabled."
I would put in the following
#description
here:"If your site has a module dedicated to handling breadcrumbs already, ensure this setting is disabled."
Comment #9
markhalliwellComment #10
markhalliwellFYI, just committed b97dbd2 to 7.x-3.x, which is just some coding standards and verbiage cleanup on theme-settings.php. You'll need to re-roll this patch.
Comment #11
valkum CreditAttribution: valkum commentedhere it is
Comment #12
markhalliwellAwesome! Thanks @valkum! Just one tiny nitpick:
I wasn't actually intending for this to be bold, but in retrospect I actually like it. It should be
<strong>
however. Also go ahead and wrap the "enabled" one above too.Comment #13
valkum CreditAttribution: valkum commentedgood point
Comment #14
valkum CreditAttribution: valkum commentedComment #15
markhalliwellOk, I just did a manual review now. Two minor things:
The top level page does not have breadcrumbs. I'm not entirely sure if this is by design or not. If it is, then that's fine. Otherwise this probably needs to be refactored.
This needs to be
0
now.Comment #16
valkum CreditAttribution: valkum commentedAs the titlefor Frontpage ist empty adding the title through
results in an array([0] => '');
And this will render to just the background.
If you show the home page link it should be fine.
Comment #17
valkum CreditAttribution: valkum commentedComment #18
markhalliwellThanks @valkum!
Committed 7bc02a7 to 7.x-3.x.
Committed b9e5144 to 7.x-3.x.
Comment #19
markhalliwell