drupal 7视图模块问题

发布于 2024-10-28 04:27:53 字数 649 浏览 0 评论 0原文

我已经创建了视图,简而言之它显示了最后 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

以酷 2024-11-04 04:27:53

这完全可以通过 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文