Is there a code example of how you could generate the children and grandchildren of a node within a .tpl.php file? I would like to use the hierarchical structure created by nodehierarchy to produce the children and grandchildren but I don't wan to be limited to a view as far as presentation?

Comments

break9’s picture

Anyone?

break9’s picture

can i use the function:

_nodehierarchy_views_get_descendant_parents($nid)

or is that function not available and how do I tell which functions are available outside of the module?

isaac.niebeling’s picture

You'd probably need to use a view, and then just theme it. There's lots of info on theming views, and I've used it to present stuff in a lot of different ways.

break9’s picture

I've tried to use the view but I can't get anything beyond the immediate children to appear. I can't get the grandchildren? So I was curious if the module made any functions available outside of itself so I could construct the page myself.

Any help is appreciated on either how to get the view to work correctly with views 2 (i am using the current dev version of nodeheirarchy)

Or how to access the children or grandchildren without using a view.

Thanks

dgorton’s picture

Status: Active » Fixed

This could et wildly out of control if you have lots of content with a deep hierarchy, but you can do this via a node_load of the child, followed by a node_load of it's children.

Status: Fixed » Closed (fixed)

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