Drupal Association members fund grants that make connections all over the world.
The Reference view module allows views to be used as formatters for CCK node and user reference fields. This means that instead of just a title, teaser, or full node, you can show nodes using any fields that are available to Views, in any sort order, in any view style, with any views theming.
To get started, you can clone the example view that comes with this module: it comes with the argument already set. You can add any fields and sorts and filters. One limitation however is that the order of items set in the CCK field isn't accessible to Views.
Suppose you want to show selected forum posts on project nodes. You'd add a CCK nodereference field on the project type, and for each project, pick some nodes. So on each project page, you get some forum posts listed. Your options for how to show these on project nodes are: titles, full nodes, or teasers.
But perhaps you'd like something else on your project nodes, such as a table of forum posts that shows post title, post author, and comment count. This module lets you do that.
You can create your own view, or clone the example view which has a number of the settings you need already baked in. Add the fields you want (fields on the forum nodes now). You can add a sort order too. You probably don't want any filters: the argument that is set in the example view is what gets you the nodes that are selected in the CCK nodereference field. Set the style to whatever you like: table, list, etc. You can use any views theming you like too. Finally, set the formatter label to whatever you want to appear in the CCK display settings for your node type.
Now set the display option on the CCK nodereference field to the label you just entered. This will pick up the view you've created, and display your table of forum posts on your project page.
Upgrading from Node reference views
This module is version 2 of Node reference views, reworked to provide multiple formatters, and for user references as well as node references (hence the change in name).
To upgrade from the older module:
- Add a display of the field formatter type to the view you were using as a field formatter.
- Give it an admin label
- Save the view
- Change your node display to use the new display with this name
You can also rename your view if you want, as the view name is no longer part of the equation. You can also have multiple displays in one view each providing a formatter, as well as combining it with other views displays for other things in your site.