It would be a nice little feature to have a field in which one could specify an alternate string to use instead of 'Home' for the first link.

Command icon 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:

Comments

xurizaemon’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Issue summary: View changes
Status: Active » Fixed

Is now a feature of the module

Status: Fixed » Closed (fixed)

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

markusbroman’s picture

Is this really a feature? Cant seem to find it. There are options for Home, Site name and Menu parent.

Is it possible to use custom text or am I missing something? Thanks!

xurizaemon’s picture

Status: Closed (fixed) » Active

I think you're right, there isn't a UX to enter custom text for this.

#3045132: Use title parent menu instead of home or sitename in breadcrumb is probably the feature I was thinking of. As you say, you may select "Home" or [site name] there, but not custom text. I'll re-open this as a Feature Request accordingly. I'm happy to see someone implement this but don't plan to do so myself.

Until that should happen, sites can use locale_custom_strings_* in your settings.php to replace "Home" with the text of your choice.

$settings['locale_custom_strings_en'][''] = [
  'Home'      => '🏠',
];

(I have not tested using emoji in custom locale strings! Just an example.)

xurizaemon’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Status: Active » Needs work

Feature contribution is welcome :)

manish-31’s picture

Assigned: Unassigned » manish-31
xurizaemon’s picture

@manish-31, thanks for self-assigning this issue :)

New features will require test coverage to be accepted. Before starting, please take a look at the tests WIP in the following issues:

- #3392139: Wrong breadcrumb due to route alterations
- #3215110: Add automated test coverage (two MRs, one is WIP)

If you have any questions, sing out!

manish-31’s picture

Thanks @xurizaemon

I will check the tests.

manish-31’s picture

Assigned: manish-31 » Unassigned
Status: Needs work » Needs review

Hi @xurizaemon

I have raised the MR please review. I have covered tests for custom text for home link feature.

While working on this I found an issue in "Use title menu parent" option for home title. For the case when we don't have home link in menu trail "Use title menu parent" option doesn't work as expected it uses site name from config as home is not available in menu trail. Ideally fallback title should be "Home". Please suggest if I should raise a new issue and assign to myself?

xurizaemon’s picture

Status: Needs review » Needs work

Thanks Manish! Yes, please do open a separate issue for the item noted in #10.

xurizaemon’s picture

Title: Custom text for 'Home' link » Provide custom text option for 'Home' link
manish-31’s picture

Status: Needs work » Needs review

MR has been updated, needs review.

Thanks!

sourabhsisodia_’s picture

StatusFileSize
new430.79 KB
new274.16 KB
new263.29 KB

Tested the MR! , MR applied successfully . Custom text option for 'Home' link is there on the config page . The value in the custom text field is visible on the breadcrumb . Attached screenshot for refrence. RTBC++.

sourabhsisodia_’s picture

Status: Needs review » Reviewed & tested by the community
xurizaemon’s picture

Rebased against 2.0.x after release of 2.0.0.

baluertl’s picture

Code changes of the MR !20 at commt db67d6c7 now tested with Simplytest.me on Drupal core 10.4.3 and works as expected. +1 RTBC