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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna’s picture

Status: Active » Needs review
remkovdz’s picture

Thanks 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!

Summit’s picture

Hi,
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

remkovdz’s picture

Will this or such a feature be comitted?

Summit’s picture

Hi,
@Kamil, can you help out here. Is this patch still ok with latest Metatag .dev?
Greetings, Martijn

DamienMcKenna’s picture

DamienMcKenna’s picture

FileSize
3.43 KB

Thanks 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.

DamienMcKenna’s picture

Status: Needs review » Fixed

Committed. This may need some follow-up to allow the tokens to be reused on other meta tags.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

np23’s picture

Status: Closed (fixed) » Active

The 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.

DamienMcKenna’s picture

Status: Active » Closed (fixed)

@nh23: Lets continue this discussion in #2101717: Allow Metatag tokens to be used as Metatag values.