I have a view of terms where I show in a grid terms form the highest level (those with parent = 0). I have to limit this view to only show those terms that contain at least one child term. I can't figure out how to do this. Anyone? Thanks!
|
|
I would say trying to do it via Views UI would be bending views too much. How about putting together the query yourself and then using views for rendering. As described in this Drupal post - http://drupal.org/node/409808 And here is another article that talks about "programming" views - http://www.metaltoad.com/blog/views-3-makes-programmers-happy Does that help? |
|||
|
|
How about reversing the approach: rather than selecting parents with children, select children but display their parents. You'd need to establish a double relation for that. First, you need to look for the parent and make it required, and then - from the parent - establish a parent-of-parent relation - and that ancestor should be null (if what you meant was the topmost level). |
|||
|
|
|
I would do quite as Arthur did, but I don't think double relationship is necessary :
You then will have only parent terms with children displaying. Of course, you'll then have to aggregate or group to avoid duplications of parents with multiple children. |
|||
|
|