Only override the first breadcumb link with 'Back to site' when it links to the homepage

Created on 23 September 2024, 3 months ago

Problem/Motivation

Currently, the Gin admin theme overrides the label of the first link in a breadcrumb with the text Back to site. This is not correct for breadcrumbs added by custom/contrib modules where the first link points somewhere else.

Steps to reproduce

An example for this is the Big menu module, which adds a breadcrumb for a specific menu and its children.

When you install the module and create a menu with multiple levels of children, this becomes visible.

Proposed resolution

Only override the first breadcrumb label when it actually points to the homepage.

Remaining tasks

  1. Write a patch
  2. Review
  3. Commit

User interface changes

The breadcrumb label is no longer overridden when the first link does not point to the homepage.

API changes

None

Data model changes

None

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇳🇱Netherlands seanB Netherlands

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

Merge Requests

Comments & Activities

  • Issue created by @seanB
  • 🇳🇱Netherlands seanB Netherlands

    Here is a patch to show the fix.

  • First commit to issue fork.
  • Merge request !505MR from #2 patch → (Merged) created by arunkumark
  • 🇮🇳India arunkumark Coimbatore

    Created MR from the #2 patch. The patch is for Review.

  • Pipeline finished with Success
    3 months ago
    Total: 190s
    #291990
  • 🇮🇳India Tirupati_Singh

    Hi all! I've applied the provided MR as a patch and it applied cleanly with no errors. After applying the text Back to site has been replaced with the current active navigation text. However, I've noticed that the hyperlink for the Back to [active_navigation] always points to the last visited node as per the ginEscapeAdmin once in the gin/js/escape_admin.js file. I've attached screenshots for reference. So, I'm adding the needs maintainer review tag for the issue and moving to RTBC.

  • 🇨🇭Switzerland saschaeggi Zurich

    Thanks y'all 👏

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024