Does the Views-integration support block views?
kirilius - December 15, 2007 - 04:57
| Project: | Node Hierarchy |
| Version: | 5.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Hello,
I am trying to create a view that shows the children of a node. The page view works but I cannot get the block view to show. Any ideas?
Is this something I am not configuring right or this module does not support block views?
Thank you!

#1
Views integration should work in a block, but by default, drupal blocks to not know what page they are being generated on or what node you are looking at. Try this:
Add the nodehierarchy parent argument to the view.
Add the following code to the argument handling code:
<?phpif (arg(0) == 'node' && is_numeric(arg(1))) {
return array(arg(1));
}
?>
That should display all children of the node you are currently looking at.
If you want to display the children of a given node that is the same wherever the block appears use:
<?php
return array( 12345 );
?>
where 12345 is the node id
R
#2
Thank you!
#3
Oh my gosh! I freakin love you Ronan! I have bee trying to figure this out all day! Send me paypal ID for reward!
#4
Ha ha, glad I could help. No reward necessary.
All the best
R
#5
Just cleaning