视图附件是否需要更改 Drupal 模板
我创建了一个 drupal 视图附件显示,其中列出了一堆节点。我如何将其添加到内容类型中?我见过需要更改模板文件的示例,但是可以在不更改主题层的情况下使用视图附件吗?
I've created a drupal views Attachment display that lists a bunch of nodes. How would I add this to a content type? I've seen examples that require changing the template files, but can views Attachments be used without making changes to the theming layer?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
视图附件显示将显示连接到同一视图中的另一个显示:查看附件显示上的附件设置块。这样做的用例是,如果您有一个摘要视图和一个必须一起显示的详细视图:您可以将详细视图显示附加到摘要视图显示。
如果您希望视图显示在视图本身以外的页面上,则需要创建块显示。然后,您有两个选择:
如果您希望它显示在您的主题定义的区域中(即作为常规块),只需转到网站建设 -> 块并将新创建的块移动到您想要的任何区域。
如果您希望它作为节点的一部分显示,您需要查看参考,其中创建一个 CCK 字段,让您选择视图。该字段可以像任何其他 CCK 字段一样放置在节点模板中的任何位置。
Views attachment displays attach the display to another display within the same view: look at the Attachment settings block on the attachment display. The use case for this is if you had, say, a summary view and a detail view that had to appear together: you'd attach the detail view display to the summary view display.
If you want a view to show up on pages other than the view itself, you need to create a block display. Then, you have two choices:
If you want it to show up in a region defined by your theme (i.e. as a regular block), just go to Site Building -> Blocks and move the newly created block to whatever region you want.
If you want it to show up as part of a node, you need View Reference, which creates a CCK field that lets you select a view. That field can be positioned anywhere in your node template like any other CCK field.