How to access node tokens?

Created on 26 October 2020, over 3 years ago
Updated 23 June 2023, about 1 year ago

I'm trying to add meta tag patterns for specific content types on the site I'm working on, and for some reason I am not able to access the node group of tokens.

I've added a meta tag field to each content type as per the documentation, and specified which meta tag groups should be available in the Metatag module settings, but when I go to add a new default and choose the content type I want, the only token groups that show up when I click "Browse available tokens" are: Current date, Current page, Current user, Random, and Site information. Nothing related to the node being viewed.

I wanted to set a page title pattern that used the node title, then a category (from a taxonomy field on the content type), then the site name.

I've cleared caches, reloaded the page multiple times, checked to make sure I really had added the meta tag field and specified the groups, but no luck.

Is there another step I'm missing that's needed to be able to have the node tokens show up?

πŸ’¬ Support request
Status

Closed: duplicate

Version

1.14

Component

User interface

Created by

πŸ‡¨πŸ‡¦Canada spidersilk

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States GreenSkunk Great Valley, NY

    Please note that when adding/creating a "Default meta tags" type you will not see all of the token options until after you have saved and then edit the new type.

    Steps to View Tokens in Metatags

    Step 1: Go to the Metatag configuration

    Metatag configuration page Administration -> Configuration -> Search and Metadata -> Metatag

    Step 2: Add a Default Meta Tags Type

    From the Metatag configuration you may begin to create a new default metatag type by clicking the button "Add Default Meta Tags".

    Step 3: Select Type

    At this point, you are selecting an entity bundle that you would like to set default meta tags for. Important Note: You will only see global tokens. You will NOT see tokens for fields. I do not recommend setting defaults for an entity bundle at this point.

    Step 4: Save

    Click the "Save" button.

    Step 5: Edit the New Metatag Type

    Click Edit for the newly-created Metatag Type.
    You will now see tokens for the fields related to this entity bundle/type that you may set for the various meta tags.

    References

    The documentation page Standard Usage Scenario β†’ states

    "To adjust metatags for a specific entity, the Metatag field must be added first"
Production build 0.69.0 2024