如何在drupal中设置分类术语的元标记,以在描述元标记中显示相关节点的标题

时间:2021-11-28 06:25:06

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

我有一个drupal网站,我使用一些分类术语。

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?

是否有特定的令牌可以做到这一点?还是其他任何方式?

1 个解决方案

#1


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

Drupal节点是内容对象,它们不应该用于显示分类术语的元信息。

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

如果你真的想要这样,你将不得不写一些代码。我建议你在这个模块中获取一个战利品:https://www.drupal.org/project/metatag你将学习如何为分类学术语页面分配元数据

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.

对于大多数情况,metatag模块应该足够了。

#1


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

Drupal节点是内容对象,它们不应该用于显示分类术语的元信息。

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

如果你真的想要这样,你将不得不写一些代码。我建议你在这个模块中获取一个战利品:https://www.drupal.org/project/metatag你将学习如何为分类学术语页面分配元数据

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.

对于大多数情况,metatag模块应该足够了。