Disable All Other Breadcrumb Handlers

Created on 29 March 2024, 8 months ago
Updated 1 April 2024, 8 months ago

Problem/Motivation

It may be that users want to ONLY provide breadcrumbs for those pages that are within their menu system, and disable any fallback breadcrumb providers. This feature would be relatively easy to implement here, but fairly difficult for users to do via extending the api.

Proposed resolution

Create an option to disable fallback breadcrumb handlers. If selected, the applies function would return true, rather than false, when the item is not found on a menu. This would raise the possibility that the menuTrail has not been set for the build function, so in that case, we should just return an empty array to make sure no breadcrumbs are displayed.

Remaining tasks

- Add setting (default to false) to disable fallback handlers to the installation config and schema.
- Add accompanying field to the admin configuration form
- Ensure in the build that pages absent from the selected menus will return an empty set of breadcrumb links
- Add test coverage for the new option

User interface changes

A new form field will be added to configure the option

API changes

There will be a new configuration value that, when set to true, prevents other fallback handlers from showing breadcrumbs for pages absent from the selected menus.

Data model changes

The new option will be added to the schema.

โœจ Feature request
Status

Needs work

Version

2.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States dgroene

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024