Problem/Motivation

Breadcrumbs and feed icons cannot currently be toggled in the theme settings like the logo, site name, and slogan can.

It has been argued that this can be done in the theme, which is true, but the same is true of the logo, site name, slogan, and everything else that can be toggled on this screen; and probably all the arguments for including those settings also apply to these. For example, what if you're using a core theme and shouldn't modify the code? Or what of clients and non-technical users who can't?

There is a proposal to put breadcrumbs in a block and remove them from page templates, see https://www.drupal.org/node/2306407. If this is agreed then the included patches need modifying.

Proposed resolution

Add checkboxes for toggling breadcrumbs and feed icons with the other theme settings.

Remaining tasks

Await decision on moving the breadcrumb to a block and then review the latest patch.

User interface changes

Checkboxes for the breadcrumb and feed icons will be added to the theme settings page.

Original report by JStarcher

It is quite an annoyance that you cannot toggle the breadcrumbs anywhere, this is a feature that should be added. Attached is the patch, it adds a body class when the crumbs are disabled so that themes can be adjusted as needed.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JStarcher’s picture

Component: syslog.module » system.module
Bojhan’s picture

Status: Needs review » Closed (won't fix)

This is clearly a won't fix, you can do this in the theme layer.

JStarcher’s picture

How do you do it without modifying code? You can remove the logo in the theme layer and we have a toggle for that.

Also, what if the user does not have access to modify files?

bryancasler’s picture

subscribe

TravisCarden’s picture

Status: Closed (won't fix) » Needs review

I'm going to presume to open this back up for further discussion. It's true you can do this in the theme layer, but the same is true of the logo, site name, slogan, and everything else that can be toggled on this screen; and probably all the arguments for including those settings also apply to breadcrumbs. For example, what if you're using a core theme and shouldn't modify the code? Or what of clients and non-technical users who can't? I actually think this is an obvious win.

JStarcher’s picture

Exactly why I wrote this patch. As a programmer I can obviously disable the breadcrumbs in two seconds. For those less technically inclined it requires research and jumping through hoops such as installing a module or figuring out the theme layer theirselves. This goes against what Drupal stands for and does not make sense. Toggling breadcrumbs is simply a missing feature that should have been implemented when the site logo and other variables were implemented. If the path was heavy and caused performance issues or bloated core, it would be worthy of more discussion. Since it is light and helps less technically inclined users significantly, I believe it is a no brainer.

TravisCarden’s picture

FileSize
2.63 KB

The patch no longer applies, so I re-rolled it, and the change works great. Great job, @JStarcher. I did change it just a bit to conditionally include a has-breadcrumb body class in addition to no-breadcrumb. (Themer's should have a positive as well as a negative hook.)

Maksym Kozub’s picture

For Bojhan and others who believe that it should be done in the theme layer: think about Stark. I will just repeat here what I said in a similar feature request (http://drupal.org/node/1507272) before I saw this issue here. Imagine a user who installs Drupal, makes some content using a built-in theme, and something is added to that user's content. Every other item of that kind (like logo, as well as "Powered by Drupal" block, etc.) can be toggled on or off from within Drupal. Breadcrumbs (which the user did not expect to be added) cannot, if the theme has no template. So the user would be forced to (a) change the theme (or create a new theme, based on Stark but having a template with div's etc.), or (b) play with the core to prevent Drupal from producing breadcrumbs , or (c) download and use an additional module (like I have done).
I may be wrong (all in all, I am a Drupal newbie :)), but in my view there is something wrong in this situation.
I definitely vote for this feature request.

TravisCarden’s picture

Your assessment is pretty accurate, @Maksym Kozub. What we need now is for people to test the patch and report back here. It's a pretty trivial change, so we just need a couple of people to confirm it works. Then we can mark the issue RTBC, and it will have a chance to be committed by the core team.

Welcome to Drupal. Thanks for getting involved! :)

TravisCarden’s picture

This is such a simple patch. Can anybody test it?

Maksym Kozub’s picture

Sorry Travis, I haven't been here for a while. I cannot say anything about 8.x-dev, but I have tested it now against 7.14 (applying it manually), and it works properly on my production site. (It is a very simple one, without lots of modules etc. I hope somebody will test it with more sophisticated Drupal installations.)
Many thanks to both Jordan and Travis!

TravisCarden’s picture

Title: Allow breadcrumbs to be toggled in admin UI » Allow breadcrumbs and feed icons to be toggled in admin UI
FileSize
2.15 KB

Ya know what? As long as we're in there, let's make the feed icons togglable, too.

I'm removing the breadcrumb body classes. If a core developer thinks they should be in there, they can be put back in.

TravisCarden’s picture

Issue summary: View changes

Updated issue summary.

TravisCarden’s picture

Issue tags: +Novice, +theme settings

Tagging.

TravisCarden’s picture

The patch in #12 still works as of today. Anybody else had a chance to test it? It would be nice to RTBC this and move it forward.

eToThePiIPower’s picture

Not working 100% for me under 8.x. Patch 12 applies cleanly against 8.x, and the added options do appear in admin/appearance/settings. However, the toggles aren't doing anything for me; the patch removes breadcrumbs and feed icons whether toggled or not.

Tested against a fresh sandbox site installed and patched through git. The breadcrumbs and feed icons appeared as normal before the patch.

Forgot to run update.php before. Now everything works as expected.

samhassell’s picture

Code looks good and works as advertised. Tested under Bartik and Stark

RTBC?

TravisCarden’s picture

Re: @samhassell, for such a small change I would go ahead and RTBC it. We've had a few people confirm that it works, so now we just need a committer's opinion, and an RTBC status is the way to get that attention. Thanks!

Bojhan’s picture

Issue tags: +Needs committer feedback

I don't really see this being necessary, so lets get committer feedback on this.

Bojhan’s picture

Issue summary: View changes

Updated issue summary.

TravisCarden’s picture

Issue summary: View changes

Added argument and counter arguments against the feature to the issue summary.

TravisCarden’s picture

Issue summary: View changes
FileSize
2.36 KB

Here's an updated patch against the current state of 8.x.

Status: Needs review » Needs work

The last submitted patch, 19: drupal-theme-toggles-1256994-19.patch, failed testing.

TravisCarden’s picture

Status: Needs work » Needs review
FileSize
3.29 KB
947 bytes

Okay; let's see what the testbot thinks about this.

TravisCarden’s picture

bryanbraun’s picture

The last patch didn't apply cleanly so I've rerolled it and attached it here.

While I was testing, I noticed that Breadcrumbs in Drupal 8 can be managed/disabled by the blocks interface. Here's the change record for that feature.

This makes me think the the ability to turn off breadcrumbs in the theme settings isn't so important and is possibly duplicative. I'd be interested to hear any opinions on whether this patch should remain the same, or if it ought to be trimmed down to just handling the RSS aspect.

Status: Needs review » Needs work

The last submitted patch, 23: drupal-theme-toggles-1256994-23.patch, failed testing.

vastav’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 23: drupal-theme-toggles-1256994-23.patch, failed testing.

kpv’s picture

jchin1968’s picture

Hi. I'm at Amsterdam code sprint and can work on this issue with roborew, stephen-cox, kiliweb and lwilliams.

Status: Needs work » Needs review
kpv’s picture

pls check #2306407: Remove breadcrumb from page template before working on it, since the part with breadcrumbs can't be resolved without solving the referenced issue

Status: Needs review » Needs work

The last submitted patch, 23: drupal-theme-toggles-1256994-23.patch, failed testing.

roborew’s picture

We've re-rolled the patch, for review. But look like this feature will be removed, so probably not worth applying.

There's no interdiff because the previous patch didn't apply.

stephen-cox’s picture

Issue summary: View changes
stephen-cox’s picture

Status: Needs work » Needs review
stephen-cox’s picture

Status: Needs review » Postponed
Issue tags: +#amsterdam2014
oenie’s picture

Issue tags: -#amsterdam2014 +Amsterdam2014

fixing the amsterdam sprint tag to amsterdam2014

Dries’s picture

Status: Postponed » Closed (won't fix)
Issue tags: -Needs committer feedback

I don't think these things need to be settings in the framework. Especially not if we're going to make breadcrumbs blocks in #2306407: Remove breadcrumb from page template. It's ok if individual themes want to expose this as settings though. All things considered, this is a "won't fix".