开发者

Output only first item of field with infinite values (Views, D7)

I have a field attached to a node "product". The field is of type image and can have infinite images. Now I want to build a view, th开发者_运维知识库at lists all products with the node's title and the first image of the field "field_product_images".

How can I achieve that using preferably Views UI? With a Template would be okay too…

I'm using Drupal 7.


In the views UI under Multiple field settings you have the option like in Drupal 6, to group the fields, select how many items to display (1 in your case) and what the first item should be (item index 0 in your case). This should achieve what you want.

Views is still in alpha, and the UI especially is a bit flaky, but this should be easy enough to setup.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜