In the last days I was working on the views integration for the nodefamily module. Unfortunately it turned out to be more complex than I thought originally.
What I wanted to do, was that views is able to automatically join the node tables of different nodes together, so that one is able to list information of both nodes.
But I noticed that this approach has some downsides. They are:
So I thought about the whole thing a bit and came to another way to achieve the same feature.
Joining of multiple views.
(Makes only sense for tabular and list views..)
This should work this way: The admin creates a view, example a userlisting using the usernode module. Then he creates a view of the profile content type (remember the nodeprofile module automatically sets a nodefamily relation between usernode and the profile content types, so there is a nodefamily relation).
So then the admin edits the userlisting view and sets it to join to the profile-content-type view.
Then the userlisting view is something like a parent view, which contains all fields of the profile-content-type view too.
I already got a proof of concept working:
The left fields belong to the usernode content type, the right fields name and age belong to the profile type.
However for achieving this i had to extend the views query code a bit, I added the possibilty to define a prefix for the table aliases of the query.
Now I'm going to generialize my code, build an UI and to create a patch for views.. :)
Add new comment