Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate breadcrumb items possible with certain configuration #2858

Open
ky940819 opened this issue Sep 20, 2024 · 0 comments
Open

Duplicate breadcrumb items possible with certain configuration #2858

ky940819 opened this issue Sep 20, 2024 · 0 comments

Comments

@ky940819
Copy link
Contributor

Feature Request

Is your feature request related to a problem? Please describe.
Currently, it is possible to create a scenario where duplicate breadcrumb items are shown.
The following requirements must be met:

  1. Link shadowing is enabled
  2. A page in the hierarchy of the current page is configured as a redirect to its own parent.

This issue only exists with shadowing turned on, otherwise the breadcrumb title and link would be for the redirect page (not the redirect target page).
However, when shadowing is turned on, and a page redirects to it's own parent page, the target page is duplicated in the breadcrumb.

Consider the page hierarchy

  • Home
    • Page 1 (Redirect -> Home)
      • Page 2 (current page)

The breadcrumb will be like:
Home > Home > Page 2

The duplication serves no purpose - it adds no information to the breadcrumb trail.
Yes, the second breadcrumb item could be suppressed by hiding the page in navigation; however, the breadcrumb can also be configured to display pages that are hidden in navigation.

Describe the solution you'd like
When creating the breadcrumb items, if the Link for a breadcrumb item is equivalent to the Link of the previous breadcrumb item, then the duplicate should be omitted from the results.

Are there alternatives?
No

Addition Considerations
In my opinion, the side-by-side duplicate items should be prevented; however, it is also possible to create two identical links in the breadcrumbs which aren't adjacent. By this I mean you could create a breadcrumb such as Home > Page 1 > Home > Page 2.
Further discussion on if all duplicates (other than the first instance) should be removed, or only adjacent ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant