User login

Making it so code-provided menu links can have their titles edited

This link is provided by the module. "The title and path cannot be edited." Drupal 8

https://www.drupal.org/node/2838106#comment-12269503

This issue is about fixing the home link in the standard profile. We should let that fix go in. That said, i'm with those saying we (also) need a general solution for this.

The problem is that module-provided (or install profile provided) menu links cannot have their titles edited, and this is unconscionably annoying. Yet the solution here is to make one link not be directly code-defined.

I got here looking for a way to let site administrators edit the name of the menu link that Give module provides. As a maintainer of the module I could simply give people another field in the configuration of the module, but making module-provided menu items have easily overridable, translatable titles is a common need that should have a fix in Drupal core.

Ancient workaround: Override the title of a Menu Item (Local task)
https://www.drupal.org/node/215712

A modern workaround:
https://drupal.stackexchange.com/questions/217252/how-do-i-alter-the-title-of-a-menu-link

https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Menu%21menu.api.php/function/hook_link_alter/8.2.x

A request just to improve the error message:
https://www.drupal.org/node/2859921

The simple disable and add a new custom menu item approach:
https://drupal.stackexchange.com/questions/227491/bartik-home-link-to-be-uppercase

core.menu.static_menu_link_overrides.yml

definitions:
  contact__site_page:
    enabled: true
    menu_name: footer
    parent: ''
    weight: 0
    expanded: false
_core:
  default_config_hash: jdY7AU0tU-QsjmiOw3W8vwpYMb-By--_MSFgbqKUTY

A site administrator can change the name of the menu link
https://www.drupal.org/node/2911170

Searched words: 
menu item title drupal 8 override module menu item title

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.