Wanted to know if it is possible to generate a view of children of children of a node. The children of a parent node can already be presented in whatever fashion in a node. However I would like to show sub-children as well... (this to avoid users clicking a number of links before arriving at a child destination). My request is similar to showing a view of alll taxonomy terms and sub terms in a vocabulary...

Comments

isaac.niebeling’s picture

If you're looking for a list of children, grandchildren, great grandchildren, etc., you could use the argument "Node Hierarchy: Descendant Of."

Isaac

deadlyminds’s picture

Thanks Isaac, for the tip. If I create this view would I be able to make it work from the "embed views" in the node edit form?

isaac.niebeling’s picture

It can be done, but I think it requires a code change. If I remember correctly, it's been discussed in the issues here before. You have to edit line 104 of nodehierarchy_views.module to allow antecedent as well as parent for the argument type.

change 104 from:

    if ( !$first_arg || $first_arg['type'] !== "parent" ) {

to:

    if ( !$first_arg || ($first_arg['type'] !== "parent" && $first_arg['type'] !== "antecedent")) {

(I know, I know... I should make a patch... but I don't remember the results of the other conversation--or even if it happened--and there may be stuff in the works from the developer)

Hope that helps

Isaac

ronan’s picture

That code is in the latest 5.x dev so if you update to that version you will not need to change any code.

deadlyminds’s picture

Thanks Isaac and Ronan...

Another dumb question - I create the ' descendant of view' and if I then use it in the node edit form, it should work right?

isaac.niebeling’s picture

Yup. If other users aren't seeing it, check some of the other threads here for info on making sure the permissions are correct.

break9’s picture

Does the same argument of "Node Hierarchy: Descendant Of" apply to Drupal 6 also. It doesn't appear to be an option in Views

ronan’s picture

Does the same argument of "Node Hierarchy: Descendant Of" apply to Drupal 6 also. It doesn't appear to be an option in Views

I renamed the argument to 'Ancestor Node ID' in D6 for consistency (Parent Node ID and Ancestor Node ID). At some point I'll work on consistency between versions as well.

Hope this helps.

break9’s picture

Got it, however the 'Ancestor Node ID' does not seem to return the grandchildren either. I can only get the children to display? Any help is appreciated.

ronan’s picture

Version: 5.x-1.1 » 6.x-1.1
Status: Active » Fixed

This should be fixed in 6.x-1.1, please confirm that it now behaves as expected.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.