Problem/Motivation
Is there any way to limit easy breadcumbs to only show the last three parent menu items? For example, If I have a menu: blogs > 2020 > january > week1 > monday > dd/mm/yy. Can I make it show home>>january>>week1>>monday?
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 3174165-8.patch | 3.93 KB | kell.mcnaughton |
| #4 | 3174165-4.patch | 3.23 KB | kell.mcnaughton |
Issue fork easy_breadcrumb-3174165
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 8.x-1.x
changes, plain diff MR !4
- 3174165-how-to-support
changes, plain diff MR !3
Comments
Comment #2
greg boggsThe first thing I'd suggest is that you use shorter URLs for your site. However, if you want to add a "max depth" feature, that seems reasonable.
How would you choose which Breadcrumbs to remove?
Comment #3
greg boggsyou can use the crumb replacement feature to cover this as well if you don't want to patch easy breadcrumb.
Comment #4
kell.mcnaughton commentedhttps://www.drupal.org/files/issues/2020-11-10/3174165-4.patch
I set up a patch that lets users limit the number of breadcrumbs.
Comment #5
greg boggsHi Kell,
Instead of implementing an alter hook, can you modify the builder plugin? So, the patch removes all breadcrumbs except the home crumb if it's over the limit? Is that right?
~G
Comment #6
greg boggsIt also looks like your config is needing the schema file addition. This is required for translation and testing.
Comment #7
damienmckennaThat feedback makes complete sense, thank you Greg.
Comment #8
kell.mcnaughton commentedhttps://www.drupal.org/files/issues/2020-11-17/3174165-8.patch
I made the suggested tweaks and rolled a new patch.
Comment #9
greg boggsLooks great. This will be in the next release! Thanks for the great feature.
~G
Comment #15
greg boggs