- Issue created by @mlncn
- πΊπΈUnited States mlncn Minneapolis, MN, USA
All right, sorry, this works great for Label links (for example an entity reference field configured to display Label with "Link to the referenced entity" configured.
It does not do anything for:
- Menu links
- Entity reference rendered entities
- π©πͺGermany Hydra
Hey thx for the great feedback!
Yeah unfortunately those systems don't use the link_generator service for generating the link. Afaik there is no way to alter the \Drupal\Core\Url object - which in those cases is used directly to create the link.
So probably the LinkItem FieldType needs to be replaced to get this working with menu links, I would not mind commiting this if someone wants to work on this. - πΊπΈUnited States mlncn Minneapolis, MN, USA
Oh there is a way i actually finally found this module while searching for the title of the blog post (to make sure it was not already written) that i was writing on doing this in custom code: https://agaric.coop/blog/turning-links-entities-have-been-rabbit-holed-m...
But as noted there, the way to do it in contrib is annoying at best (and at least at one point for me a year or so ago, not working): https://drupal.stackexchange.com/a/246712/4195