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.
Hi,
I need to get value of a meta from the node template. If the meta is set for the node, there's no problem and using metatag_metatags_load('node', $node->nid) works great. But if the node uses the default values, then the specific value I need is not set and I can't find how to get if.
How is this possible ?
Comments
Comment #1
mariacha1 CreditAttribution: mariacha1 commentedThis worked for me:
The value of $metatags will be an array keyed off the tag names.
Depending on the location of this code, $node might already be "loaded", in which case, obviously you can skip the first line.
Comment #2
tahiticlic CreditAttribution: tahiticlic commentedThanks !