[development] Listing Nodes in Node View using Views

Ron Parker sysop at scbbs.com
Tue Dec 18 23:45:20 UTC 2007


> a) Add a view to the content of a node

Have a look at the component module's component_get_view() function.  
Don't actually use component, but you can grab the few lines of code you need from it.

Thank you.  I looked at the code.  I see how to use it as a link from the node (using 
the hook_menu example in the code).  But, I don't see how to actually have the automatcially
view come up when the event node is viewed.

Or, since I've finally figured out how to list the items using hook_nodeapi($op='view'), would you
suggest I simply do this:

        $view = mymodule_get_view($viewname);
        $node->content['agenda'] = array(
          '#value' => $view,
          '#weight' => 10,
        );

Thanks so much for all the help!

-ron

- 
Ron Parker
Software Creations               http://www.scbbs.com
Self-Administration Web Site     http://saw.scbbs.com
SDSS Subscription Mgmt Service   http://sdss.scbbs.com
Central Ave Dance Ensemble       http://www.centralavedance.com
R & B Salsa                      http://www.randbsalsa.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20071218/46dc2639/attachment-0001.htm 


More information about the development mailing list