开发者

How to use Token in Drupal 7

开发者 https://www.devze.com 2023-04-05 10:47 出处:网络
I\'m probably mixing things up here, so here it goes: In a Drupal 7 website, I have a few content types with several fields. One such field references another node. Usually the title of that referenc

I'm probably mixing things up here, so here it goes:

In a Drupal 7 website, I have a few content types with several fields. One such field references another node. Usually the title of that referenced node is displayed then. Drupal provides a token view mode though, and I thought I could use it to customize what fields of the referenced node get displayed. In fact, I don't want the title but an image of the referenced node to be displayed. And 开发者_运维问答frankly, I don't get the whole thing.

How can I alter what this token view mode displays, or is the wrong approach?


actually, you don't have to use tokens here. You can add Relationship in the view (advanced settings) and then add your field (referenced image) as usual field in view, but specifying relationship. So in the output you'll receive your common fields from the "master" content type and field with referenced node image.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号