drupal 7视图模块问题
我已经创建了视图,简而言之它显示了最后 5 条新闻标题和图像 并将它们放在首页 但具体来说,我只想显示第一个节点的图像,其余的仅显示它们的标题,那么正确的程序是什么。 是否有该模块的 api 文档,以便我可以查看其功能和属性并打印我需要的内容。
这是创建的视图的摘要查询,但我认为它对我的需要没有用处:
SELECT node.nid AS nid, node.title AS node_title, node.language AS node_language, 'node' AS field_data_field_img_node_entity_type FROM {node} node LEFT JOIN {taxonomy_index} taxonomy_index ON node.nid = taxonomy_index.nid LEFT JOIN {taxonomy_term_data} taxonomy_term_data ON taxonomy_index.tid = taxonomy_term_data.tid WHERE (( (node.status = '1') AND (node.type IN ('news')) AND (taxonomy_term_data.name LIKE 'Lates News' ESCAPE '\\') )) LIMIT 5 OFFSET 0
i have created view , in short it display last 5 news title and image
and put them in front page
but specifically i want to show only the image of the first node and the rest only title of them , so what the proper procedure .
is there api a documentation for this module so i can go through its functions and properties and print what i need.
here is a summary query for the created view but i think it won't be useful for what i need:
SELECT node.nid AS nid, node.title AS node_title, node.language AS node_language, 'node' AS field_data_field_img_node_entity_type FROM {node} node LEFT JOIN {taxonomy_index} taxonomy_index ON node.nid = taxonomy_index.nid LEFT JOIN {taxonomy_term_data} taxonomy_term_data ON taxonomy_index.tid = taxonomy_term_data.tid WHERE (( (node.status = '1') AND (node.type IN ('news')) AND (taxonomy_term_data.name LIKE 'Lates News' ESCAPE '\\') )) LIMIT 5 OFFSET 0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这完全可以通过 Views 界面来完成。更改显示以显示 4 个新闻节点的标题,偏移量为 1。然后,添加一个输出单个节点的附件显示,并将其设置为显示标题和图像。然后,将该显示器连接到另一个显示器之前。
This can be done completely through the Views interface. Change your display to show the titles of 4 news nodes with an offset of 1. Then, add an attachment display that outputs a single node and set it to display the title and image. Then, attach that display before the other display.