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:
 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.. :)
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.. :)
      
- Joining two node tables with the help of a simple nid-nid relation is quite impossible to do, as views doesn't know which nid is which type and which fields belong to it.
- So automatically joining with the help of the type information would be possible. However, this would have required patching of both CCK and views and further: Extending views to automatically join the node tables appropriate would be quite complex.
- If a field of another content type would be added views would join the node table of this content type to be able to display its content, however if a field belongs to more than one content type which should views use for joining!?
 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.. :)
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.. :)