[support] Showing Just Immediate Parent

Chris Pall chrispall at gmail.com
Fri Sep 4 16:07:23 UTC 2009


I was thinking that it might be difficult to create selection lists with
taxonomies for some reason. I felt it might be a bit clumsier, but perhaps
this is the way to go.

-- cgp



On Fri, Sep 4, 2009 at 10:14 AM, Seth Freach <sfreach at gmail.com> wrote:

>  Chris,
>
> A hierarchical taxonomy vocab might be a different way to solve your
> issue.  Consider using tags and the relationships between them instead of a
> CCK field.  Then, in Views you can define relationships based on parent
> terms (among other things that Views will do w/ taxonomy out of the box).
> Some of the posts in http://groups.drupal.org/taxonomy may be relevant.
>
> Seth
>
> Chris Pall wrote:
>
> 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
>
> ------------------------------
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/support/attachments/20090904/a5d72aad/attachment.htm>


More information about the support mailing list