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.
Here's a patch that exposes metatag data as tokens, which let's you do all the regular stuff that tokens allow, and also brings us a step closer to panel integration, because now you can define metatags on a node or term, enable page manager and use metatag tokens in http://drupal.org/node/1210648 fields to expose them to the user in the regular spot.
Comment | File | Size | Author |
---|---|---|---|
#7 | metatag-n1671846-7.patch | 3.43 KB | DamienMcKenna |
added_tokens.patch | 3.19 KB | benys | |
Comments
Comment #1
DamienMcKennaComment #2
remkovdz CreditAttribution: remkovdz commentedThanks a lot, I patched it. However, I have no new tokens showing up. But to be honest I don't know where to look. Any help is appreciated!
Comment #3
Summit CreditAttribution: Summit commentedHi,
Can;t get metatag working with current-page:url:unaliased:args:value: [x]..
Is this patch correct?
Do I miss anything here?
Thanks a lot in advance for your reply.
greetings, Martijn
Comment #4
remkovdz CreditAttribution: remkovdz commentedWill this or such a feature be comitted?
Comment #5
Summit CreditAttribution: Summit commentedHi,
@Kamil, can you help out here. Is this patch still ok with latest Metatag .dev?
Greetings, Martijn
Comment #6
DamienMcKennaClosed a duplicate: #2032073: Same meta content in "og:" metatags as in some other metatags (possible metatags tokens)
Comment #7
DamienMcKennaThanks for putting this together. This functionality at least partly works - the available tags are shown in the token browser. It is not, however, possible to use the token for one tag to fill another meta tag, so I've updated the description to indicate this. Also, I moved the new functions into metatag.tokens.inc as that's where they belong.
Comment #8
DamienMcKennaCommitted. This may need some follow-up to allow the tokens to be reused on other meta tags.
Comment #10
np23 CreditAttribution: np23 commentedThe metatag token patch works great! Are there any plans to update metatags tokens to be used by other metatags? It might help folks using meta description and og:description tags to enter the description once and then rely on that description's token to handle the population of the other description tag. I think the duplicate issue in #6 mentions that case.
Comment #11
DamienMcKenna@nh23: Lets continue this discussion in #2101717: Allow Metatag tokens to be used as Metatag values.