i am relatively new to drupal and learning on 6.x and am currently using the node hierarchy module in parallel with the inherent menu hierarchy to develop some structure in my site(this is a good method of establishing structure i hope?). i would like to have a view where only the nodes that are children under node hierarchy are displayed on a node's page. i know this is possible somehow im just not sure how. right now i have node hierarchy module and its views integration enabled, as well as views module of course. have a view configured right now that works, it just displays all nodes in a list on any page that has the view enabled on it. how do i "limit" this list that is currently showing up on a node's page to only the nodes that are its children?
node hierarchy documentation says theres an arguement "Parent Node Id" but i dont know how to use this. it isnt really obvious.
thanks a lot.
Comments
anyone?
anyone?
select Parent Node ID for
select Parent Node ID for the argument
In Fields, select node title etc of children you want to show on each parent page
in path write node/%
Now all parent nodes will show a view of children
If you want to put the view onto Parent pages as a block, select "Default argument = Node ID" in arguments
thanks for the reply. for
thanks for the reply. for some reason parent node ID is not showing up under arguements. and i have all the necessary modules installed and active. this is strange no?
Parent Node ID not showing up - Solution
CaHamdy,
I encountered the same problem, isaac.niebeling hinted this could be caused by the latest version of the Views module not being compatible with the latest version of Node Hierarchy.
I rolled back to views-6.x-2.0-rc1, and sure enough the Node Hierarchy arguments were showing up in the Arguments list again!
Maybe this is also useful: the method I used to display children nodes of the same parent (sibling nodes) in a block view:
1. Create a View where you add a "Node Hierarchy: Parent Node" argument.
2. Select "Provide default argument", select "PHP Code" and enter:
3. To exclude the current node from the view, add another argument, "Node: Nid", same settings as in step 2 and enter the following code:
4. Be sure to tick the "Exclude the argument" box!
ahh thanks. i guess the
ahh thanks. i guess the most recent versions of the modules don't work together. is there any way to let the developers know about this?
I got this feature working
I got this feature working today with the latest development snapshot of node_hierarchy and views-rc4
--
Tom
codegobbler.com - web design and development
--
Tom
www.systemseed.com - drupal development. drupal training. drupal support.
I am having trouble getting
I am having trouble getting anything beyond the immediate children to display, can you enlighten me on how I could produce the children and grand children?
can't get it to work
I've tried your solution but it doesn't seem to work. I am using pathauto aliases...could that be messing it up?
EDIT:
Scratch that...I didn't realize that there is no good way to test that snippet from the views page, because it relies on the fact that you aren't providing an argument (at which point the default php snippet kicks in) and without an argument, the views page doesn't have any node context.
If I view the block on a real page, it works.
x
x
New version of Node Hierarchy
There is a new version of Node Hierarchy that restores compatibility with Views (version 2.0+): http://drupal.org/project/nodehierarchy
check out how I have managed to do it
check out how I have done it at my site at www.auscamping.com.au
I have used panels and views, and terms (heirachy) and taxonomy redirect.
any questions let me know
sean
Hi sean_e, Can you help me to
Hi sean_e,
Can you help me to display my parent, children and grandchildren on a page?
Thanks,
Karen
I went to your site, but
I went to your site, but can't see the example. Do I need a login and password?