Allow altering the route entity

Created on 29 April 2022, over 2 years ago
Updated 6 August 2024, 6 months ago

Problem/Motivation

Developers can't alter the entity selected by metatag_get_route_entity. An example where this would be useful: If the route entity is a GroupContent entity, someone might want to replace that with the referenced content entity.

Steps to reproduce

n/a

Proposed resolution

Pass the output of the function thought an alter hook.

Remaining tasks

n/a

User interface changes

n/a

API changes

n/a

Data model changes

n/a

Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

🇸🇮Slovenia alecsmrekar

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇧🇪Belgium vodde83

    This hook was exactly what I needed in my case, as on Nodes in a Group, a GroupRelationship entity was picked up by metatag_get_route_entity().
    And not the actual Node itself. This resulted in the incorrect Metatags being generated.

Production build 0.71.5 2024