Hi, can anyone help me with this?

I want to establish a "node relativity" - I have a node type "hospital" (no CCK, just title/body) which should have sub-nodetypes, department. each department belongs to one hospital, so a node reference should do the trick.

Now I want to have a block on each hospital page that is a *view* of all the departments which have this hospital in their CCK node reference.
I don't get it.
I tried each single module that has to do with node relativity: node relativity, hierarchical select, NAT, container, and many others.

The module what I think is the best solution is "Views Arguments Extras" with ctools - but how should I configure this to get my wanted result?
Any help appreciated.

Later each department should have the same sub nodes, named "station"

So the hierarchy should be like this:

*hospital 1
|
+-department A
| +-station X
| +-station Y
|
+-department B
+station Z
*hospital 2

hospital node type:

title/body;
block view: all departments associated with this hospital

department node type::

CCK "hospital_ref", auto-title, body
block view: all stations associated with this department

station node type::

CCK "hospital_ref" (needed?), "department_ref", auto-title, body

Any ideas? is CCK/Views Argument Extras the right tool for this?
Thanks

Comments

WorldFallz’s picture

Use cck nodereferences to relate the nodes and views_attach or one of the other view embedding modules (ie viewfield, view_reference, etc) to list the related nodes as desired. See http://www.lullabot.com/articles/photo-galleries-views-attach for a good explanation of how to do this. It's about images and galleries, but it could be any type of related content types. There's also many nodereference enhancing modules in the downloads area you can use to get some pretty functionality.

nerdoc’s picture

Thanks - think that's exactly what I searched for.
I used the views block, but that one doesn't seem to recieve arguments of the page - so views_attach is (theoretically) the best solution - I'll test it and report.

nerdoc’s picture

This was EXACTLY what I searched for. Your answer saved me another 15 hours searching ;-)

oh - and I saw that this should have been in the "Post installation" forum... sorry, didn't see it.
Chris

WorldFallz’s picture

no worries-- and glad it worked out ;-)

zeezhao’s picture

Thanks for the tip too.

Fyi - another module I've been using for hierarchy is: http://drupal.org/project/nodehierarchy