Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am using the metatag open graph
module.
I want the og:title metatag
should have the value page title metatag
.
for this I'm using the [metatag:title]
token in the open graph content title
field. But When I see the source code of the page, I didn't see the og:title metatag
in the source because I think the token returns empty string.
Is there any specific method for using the metatag tokens or it is a bug?
Comments
Comment #2
DamienMcKennaI believe there's a bug there that I've never fully worked through. Does it work if you instead do e.g. [node:metatag:title].
Comment #3
hmdnawaz CreditAttribution: hmdnawaz commentedYes this one is working. So should I use
node:
as a prefix for every metatag token? like for example for metatag description [node:metatag:description] will be used instead of [metatag:description]?Comment #4
DamienMcKennaYes, as a workaround until the underlying problem can be fixed.
Comment #5
DamienMcKennaComment #6
DamienMcKennaSee also: #2301053: How to use, display the contents of [metatag:keywords]
Comment #7
marcelovaniComment #8
Helianthropy CreditAttribution: Helianthropy as a volunteer and for Race Forward commentedI recently came across this issue in trying to use cascading metatags. Using the "node" prefix in the metatag token resolved the issue for me. I thought it might be helpful to include that tip in the Tokens browser, though I see that the following message already appears: "Generated by the Metatag module, may not be used to fill in other meta tags." Is that message related to this issue?