简体   繁体   中英

How to set taxonomy terms' meta tags in drupal, to display relevant nodes' title in the description meta tag

I have a drupal site and i use some taxonomy terms.

I use these taxonomy term pages to display those nodes having the relevant term.

As an example I have a taxonomy term Cars and in /cars page, are being displayed the nodes with term car.

Like Audi-BWM-Ford.

I need to configure - taxonomy terms pages- meta tags, and i need in the description meta tag area displaying the nodes' titles of each term.

Is there a specific token that can do that? Or any other way?

Drupal nodes are content objects, they are not supposed to be used to display meta informations for taxonomy terms.

If you really want it this way, you'll have to write some code. I suggest you take a loot at this module: https://www.drupal.org/project/metatag You'll learn how to assign metadata to taxonomy term pages

Then, you'll have to query you database to retrieve your node titles and set them as a meta.

For most cases metatag module should be enough.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM