views fusion for nodeprofiles

Submitted by fago on Wed, 07/26/2006 - 15:11
By doing the nodefamily views integration I ended in writing the module views_fusion.
Views Fusion allows one to fuse multiple views into one. So you can build fusioned views that display information that is stored in multiple nodes - useful for tabular views. It uses node relations for joining the appropriate nodes together.
The views fusion needs information from another module to know how to join the node tables. For this a hook is provided. The nodefamily module makes use of this hook (hook_views_fusion()). So it's possible to fuse views by using the nodefamily relation. Usage Example Perhaps I give a short usage example. Let's describe how to achieve the following view: profilelist The left fields stem from the usernode content type provided by the usernode module. Create a view 'userlist' which contains them. The right fields name and age stem from a according content type 'content-profil'. Create an appropriate content-type using CCK and create the fields 'name' and 'age'. Mark this content type as user profil using the nodeprofile module, by that the nodeprofile module creates a nodefamily relation between the content types 'usernode' and 'content-profil' for you. Then create a view called 'profil' which lists nodes with the type 'content-profil' and displays its fields 'name' and 'age'. Ok, now there are the two independent views. So let's make a fusion. Go to 'admin/views/fusion' and fuse the view 'userlist' with the view 'profil'. To test it go to the page provided by the view 'userlist'. You should get the fused view according to the example image above. :) Example view: During the development I've created the following view: profilelist extended It uses 4 different views, which each uses a own content type. The views get fused this way: usernode-view | | | \---- profile-company | \------- profile ---------- address As you can see views_fusion can fuse more than two views into one view :)