[support] Showing Just Immediate Parent

Chris Pall chrispall at gmail.com
Fri Sep 4 13:58:17 UTC 2009


I've got a CCK content type which can refer to itself to note a "parent". In
a view, I want to group by the parent. I'm not going all out in displaying a
tree hierarchy, though I suppose that would be fine if that were supported
by some module. The problem I am having is that when I employ a relationship
to show the title and group, it is somehow racing to the top of the "tree"
and grouping by the "root" parent. Is it possible limit to the immediate
parent?

I've seen a couple of relationship modules, trees modules, but is there
anything that really seems to address doing what I've got in the data
structure I've established?

For example:

Data is:
"Title" -> "Parent", "Body"
1. North America -> (no parent) - This is a continent.
2. United States -> North America - This is a country in North America
3. Michigan -> United States - This is state in the US.
4. Washington -> United States - This is different state in the US.
5. Dearborn -> Michigan - this is a city in the US.
6. Lansing -> Michigan - this is another city in the US.
7. Kalamazoo -> Michigan - this is yet another city in the US.

My view grouped by the "Parent" (with a relationship), and what I get is:
------
*Group Name: (empty)*
North America - This is a continent

*Group Name: North America
*United States - This is a country in North America
Michigan - This is state in the US.
Washington  - This is different state in the US.
Dearborn - this is a city in the US.
Lansing - this is another city in the US.
Kalamazoo - this is yet another city in the US.
-----



*What I'm hoping for is:*
---
*Group Name: (empty)*
North America - This is a continent

*Group Name: North America*
United States - This is a country in North America

*Group Name: United States*
Michigan - This is state in the US.
Washington  - This is different state in the US.

*Group Name: Michigan*
Dearborn - this is a city in the US.
Lansing - this is another city in the US.
Kalamazoo - this is yet another city in the US.


-- cgp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/support/attachments/20090904/05614493/attachment-0001.htm>


More information about the support mailing list