Option to use compact or full breadcrumb navigation

Created on 11 September 2023, 10 months ago
Updated 30 May 2024, 29 days ago

Problem/Motivation

When using the Gin theme vs the Claro theme, within Gin the breadcrumb navigation is compact compared to the Claro theme. This is fine in most cases however for websites such as the one I have which uses Groups and other modules for multi-site we use the ability to see the breadcrumb of the page we are editing. The content editors of the website also use the breadcrumb to navigate around as well as for checking they are in the correct area.

i.e.

Current
Home | Page name

Proposed
Home | Administration > Sites > SITENAME > Page name

Proposed resolution

Have a theme setting to set breadcrumb size.

Compact (default) or Full (same as Claro)

πŸ’¬ Support request
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom millnut

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

Comments & Activities

  • Issue created by @millnut
  • Status changed to Closed: won't fix 10 months ago
  • πŸ‡¨πŸ‡­Switzerland saschaeggi Zurich

    We're currently not planning in adding new features at this point while we aim in making what we have stable.

    You could create a module which hooks into breadcrumbs to achieve that.

    So closing this as won't fix.

  • Status changed to Active 29 days ago
  • πŸ‡©πŸ‡ͺGermany berliner

    The problem with this as far as I can see, is that whatever custom breadcrumb one puts in place, gin_preprocess_breadcrumb() will just overwrite it for all routes where an entity object can by extracted by _gin_get_route_entity().

    So this doesn't look like a feature request, but more like a support request. It would be good to be able to opt-out of this behaviour on the gin side. The way it is right now feels a bit greedy.

    Or is there already a way to opt out of this that I just didn't see?

  • πŸ‡©πŸ‡ͺGermany berliner

    For discussion: Maybe something like this patch, which allows to opt-out of the gin breadcrumb processing doing this:

    /**
     * Implements hook_preprocess_breadcrumb().
     */
    function MY_MODULE_preprocess_breadcrumb(&$variables) {
      $node = \Drupal::routeMatch()->getParameter('node');
      if ($node->bundle() == 'MY_BUNDLE') {
        $variables['gin_breadcrumb_skip'] = TRUE;
      }
    }
    
Production build 0.69.0 2024