Step 4: Build a view that lists your profiles (optional)
This page shows you how you can create a view with the popular views module for your profiles.
If you have a simple nodeprofile, which consists only of one type, just create a view as usual and list the nodes of your type. If you have a more complex nodeprofile, consisting of several content types, you'll need to use the views fusion module. This page describes how that can be done.
If you want to use views fusion with CCK nodereference fields, have a look at this handbook page.
Views Fusion allows one to fuse multiple views into one. So you can build fused views that display information that is stored in multiple nodes - useful for tabular views. It uses node relations for joining the appropriate nodes together.
If you want to build a view, which lists node teasers or full nodes, then you need views_fusion only, if you want to filter on data/fields, which belong to a child node. Otherwise you are fine with a view that just lists your nodeprofiles like every other node.
- Otherwise you need views fusion. So install it and make sure that you are running a compatible views module.
- Then create a view for each of your content types that shall be included. E.g. if we have a nodeprofile with the content type "profile" and a child content type "personal data", create two views, where the first lists nodes of the type profile, and the second nodes of the type "personal data". Set both views to "tabular" output mode and include at least one field, e.g. the node title of each type.
- Now you can fuse your views. Decide which view should be the "primary view", this is the one your users will use to see the results. Let's assume we use our "profile" view for this, so we configure this view to provide a "page" for us. Then go to to the fusion tab located at admin/build/views/fusion and create a new fusion. Set the view for the profile content type as "primary view" to be fused with the other view for the "personal data" and use the parent-child nodefamily relationship.
If you are using the "personal data" view as primary view, you have to use the child-parent relationship according to the existing nodefamily relation settings. - That's it, just go to the page provided by your primary view and there should be the fused view, which contains the fields of both views and also respects filters of both views. Now go and adapt your views so that it fits to your needs.
Don't worry, views fusion can also fuse views, which are already fused. It's also working well for external filters. But unfortunately there is no easy way for reordering the fields of the resulting view, so if you want to mix up the fields of fused views in the resulting view you have to do it in a theme or wait for views 2.0 :)
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion