[development] Listing Nodes on a Node View

Michael Favia michael at favias.org
Tue Dec 18 18:03:24 UTC 2007

Ron Parker wrote:
> I've created an agenda.module which associates agenda nodes with event
> nodes. I wish to list all agenda nodes associated with a particular
> event when I view the event. I've come up with code in hook_nodeapi that
> I *thought* would do this, but it isn't. Can anyone help? Thanks.

Listing nodes is a great place to use the views module to construct and
display a default view and add it to the content of the node.

You also don't need to store the item twice afaik because you can still
access the "content" array in the theme for custom theming. Unless you
have a heavier module modifying it.

Assuming agenda_list() returns output, this otherwise looks functional.
If you are duplicating "views" functionality though i might suggest just
calling on that module to do the job.

Michael Favia                   michael at favias.org
tel. 512.585.5650        http://michael.favias.org

More information about the development mailing list