How to set metatags on entity edit forms?

Created on 14 August 2024, 8 months ago

Problem/Motivation

I am trying to alter the metatags (title) on the user edit form. Specifically on a form mode alternative (form mode manager module) for the default user edit form (although the default doesn't work either).

In the .api file i see 3 hooks that sound like they might be of use but none of these are hit:
function hook_metatag_route_entity(RouteMatchInterface $route_match) {
function hook_metatags_alter(array &$metatags, array &$context) {
function hook_metatags_attachments_alter(array &$metatag_attachments) {

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Active

Version

1.26

Component

Documentation

Created by

πŸ‡¨πŸ‡¦Canada liquidcms

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

Comments & Activities

  • Issue created by @liquidcms
  • Status changed to Closed: won't fix 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Metatag doesn't effect the meta tags on entity forms, you should look at core's APIs for that. Sorry.

  • Status changed to Active 8 months ago
  • πŸ‡¨πŸ‡¦Canada liquidcms

    Ahh.. good to know. Thanks for the reply.

  • πŸ‡¨πŸ‡¦Canada liquidcms

    Would it be unreasonable to think of that as an added feature? I.e. "add tag definition by path" either through ui or a hook. Would think a shame to lose all the advanced tag definition provided by this module to go with a simple core hook to modify these in code.

  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Did you try the included metatag_route module?

Production build 0.71.5 2024