Problem/Motivation

Sometimes I just want to turn-off Easy Breadcrumb for administration pages.

It can be easier to manage on a site with a different Administration theme and admin pages that don't play well with Easy Breadcrumb.

Proposed resolution

Add a simple configuration checkbox, that is on by default, labeled "Applies to administration pages".

Take the code from the blog post here:

http://www.gregboggs.com/drupal8-breadcrumbs/

$request = \Drupal::request();
$route = $request->attributes->get(RouteObjectInterface::ROUTE_OBJECT);
// Do not adjust the breadcrumbs on admin paths.
if ($route && $route->getOption('_admin_route')) {

}

And use it in the method:

\Drupal\easy_breadcrumb\EasyBreadcrumbBuilder::applies()

Remaining tasks

Update the documentation
Write some tests

User interface changes

New configuration option to apply to administration pages - on by default or if never set before

API changes

None.

Data model changes

Update to config schema for new boolean config option.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chOP created an issue. See original summary.

chOP’s picture

Status: Active » Needs review
FileSize
4.41 KB

Please review this patch as starting point. Hope this fits with the direction you're taking the module.

Greg Boggs’s picture

Hey, that's my blog. ;) Code looks good. I'll get it tested and into the next release.

dpacassi’s picture

Status: Needs review » Reviewed & tested by the community

The patch works fine, thanks a lot for the work!

davidbp’s picture

Work for us too :) using version 8.x-1.8.

ytsurk’s picture

Plays nicely

renatog’s picture

Great! Simple and effective.

+1 to it

P.s. @Greg, your blog is super cool! haha

Congrats :)

  • RenatoG committed 708b4b3 on 8.x-1.x authored by chOP
    Issue #2990803 by chOP, dpacassi, davidbp, ytsurk, Greg Boggs, RenatoG:...
renatog’s picture

Status: Reviewed & tested by the community » Fixed

Committed to the dev branch.

Thank you very much for contribution, guys.

Good Work and Good Week!

Best,

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.