Drupal Association members fund grants that make connections all over the world.
Breadcrumbs use a static pattern but should be updated to a service to get the functions out of the global scope.
Breadcrumbs are a sticking point in the panel-ish controller conversion.
Create a service to manage breadcrumbs
Create the class and register the service
Investigate more about how the system will actually be used.
- on the theme / display level
- modules that provide breadcrumb builder plugins. for this we should investigate the various drupal_set_breadcrumb() that already exist in core.
User interface changes
Breadcrumbs becomes a block
API changes: Introduce BreadcrumbBuilder
drupal_set_breadcrumb() will be deprecated or removed.
Instead, we will have a "breadcrumb" service, which can build a breadcrumb for any given request.
The service operates with a series of breadcrumb builder objects, representing the different modules or components of the site that provide breadcrumbs for specific pages - e.g. menu, taxonomy, etc.
The main breadcrumb service will iterate over the registered builder objects, until one of them provides a breadcrumb.
It was discussed whether those builder objects should be services or plugins. For now the consensus is that they should be services, identified by a tag in services.yml.
Drupal 7 contrib has some interesting advanced solutions for breadcrumb building, that outshine what we are doing here.
In this discussion were mentioned:
- Path breadcrumbs, mentioned in
- Crumbs, mentioned in #7 (donquixote), and #36 (bojanz). This shares the basic ideas of this core architecture, but takes it to a new level:
- Not the entire breadcrumb, but each segment, is individually negotiated by plugins.
- Plugins can be sorted in a fine-grained manner.
- The breadcrumb is built leaf-to-root in a hierarchical way, allowing to combine segments/joins provided by different plugins that do not know about each other.
It would have been an option to put some of this into core, but
- this would have been a lot of work, and we don't have enough time before freeze.
- It would prevent contrib to further improve those systems.
Instead, what we focus on here is:
- Architectural clean-up of the D7 core breadcrumb system.
- Keep it simple, leave advanced use cases to contrib.
- Roll out the red carpet for contrib modules: Allow contrib modules to either provide specific breadcrumb builders, or replace the entire breadcrumb service.
Original, but deprecated part of the issue summary
API changes (deprecated)
method to make it easier to work with.
PASSED: [[SimpleTest]]: [MySQL] 57,719 pass(es). View
FAILED: [[SimpleTest]]: [MySQL] Drupal installation failed. View