欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

views "Profile" and "Node content".

shiping1 的头像

Views attach

Note: This module has been deprecated for Drupal 7 in favor of its phoenix, EVA.

This module provides two additional Views display plugins, "Profile" and "Node content". These displays do not display on a page but get "attached" to either a user page or nodes of specified types. These views are not stored with the user or node, the way viewreference.module would, so they can be globally-reconfigured.

The node content display can be reordered on the "Manage fields" tab if CCK is enabled. If not, it will have a weight of 10 so it floats to the bottom of the node.

Usage tips

Many people have asked how to use this module to show content related to the node or user to which a view is attached. The answer is to use Arguments. Even though attached views have no path, they still get to make use of arguments.

  1. Create a nodereference field on some node type. Create several nodes of that type that nodereference to some other node.
  2. Create a new "Node content" display. Configure it as desired.
  3. Add an argument for the nodereference field you created in step 1.
  4. Set the default value of that argument to "Node ID from URL".
  5. Set the display to show on node types that are pointed to by that nodereference field.
  6. Profit! The view will now show all nodes that nodereference TO the node currently displaying (plus whatever other filters you have).

The same approach works for nid, uid, userreference, or similar fields. There's much fun to be had with Arguments. :-)

Videos

Mustardseed Media has posted an excellent videocast on using Views Attach with Nodereference URL. Highly recommended if you're having trouble wrapping your head around this module.

Oliver Seldman has also posted a video from the LA Drupal group showing how to use Views attach with Content Profile.

Credits

Views_attach was originally developed by Jeff Eaton but never released. Larry Garfield later cleaned it up and added the CCK integration.

来自 https://drupal.org/project/views_attach



附加意见

注:该模块支持其凤,为被废弃为Drupal 7 的EVA 

该模块提供了两个额外的查看显示的插件,​​“个人资料”和“节点内容”。 这些显示器不显示在页面上,但得到“附加”到任何一个用户指定类型的网页或节点。 这些观点并不存储与用户或节点,顺便viewreference.module会,使他们能够在全球范围内,重新配置。

节点内容显示可以在“管理域”选项卡上的重新排序,如果CCK已启用。 如果不是,它将具有10重量所以它漂浮到节点的底部。

使用技巧

很多人都问如何使用这个模块来显示与到一个视图附加的节点或用户内容。 答案是使用参数。 虽然附加的看法有没有路径,他们仍然得到使参数使用。

  1. 在某些节点类型创建一个nodereference领域。 创建该类型的nodereference到一些其他节点的多个节点。
  2. 创建一个新的“节点的内容”显示。 根据需要配置它。
  3. 加入您在步骤1中创建的nodereference领域的说法。
  4. 设置该参数的默认值改为“节点ID的URL”。
  5. 设置显示屏上显示一个受nodereference场指向节点类型。
  6. 利润! 该视图现在将显示nodereference于当前显示的节点(再加上你有什么其他的过滤器)的所有节点。

同样的方法也适用于NID,UID,userreference,或类似领域。 还有很多乐趣是与参数。 :-)

视频

芥媒体已经发布了一个极好的视频广播使用次数与安装Nodereference网址。 强烈建议,如果你遇到麻烦包裹你的头解决这个模块。

奥利弗Seldman还张贴了从一个视频洛杉矶Drupal的小组展示了如何使用次数与附加内容简介 

积分

Views_attach最初是由开发杰夫·伊顿 ,但从来没有公布。 拉里·加菲尔德后来清理了,并且增加了CCK整合。

来自 https://drupal.org/project/views_attach

普通分类: