<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<p>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.<br>
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span
style="color: rgb(0, 0, 187);"><?php<br>
</span><span style="color: rgb(0, 119, 0);">function </span><span
style="color: rgb(0, 0, 187);">agenda_nodeapi</span><span
style="color: rgb(0, 119, 0);">(</span><span
style="color: rgb(0, 0, 187);">$node</span><span
style="color: rgb(0, 119, 0);">, </span><span
style="color: rgb(0, 0, 187);">$op</span><span
style="color: rgb(0, 119, 0);">, </span><span
style="color: rgb(0, 0, 187);">$arg </span><span
style="color: rgb(0, 119, 0);">= </span><span
style="color: rgb(0, 0, 187);">0</span><span
style="color: rgb(0, 119, 0);">) {<br>
global </span><span style="color: rgb(0, 0, 187);">$form_values</span><span
style="color: rgb(0, 119, 0);">;<br>
switch (</span><span style="color: rgb(0, 0, 187);">$op</span><span
style="color: rgb(0, 119, 0);">) {<br>
case </span><span style="color: rgb(221, 0, 0);">'view'</span><span
style="color: rgb(0, 119, 0);">:<br>
</span><span style="color: rgb(255, 128, 0);">// If the user
has the view agenda perm and this node is agenda enabled<br>
// display the agenda list.<br>
</span><span style="color: rgb(0, 119, 0);">if (</span><span
style="color: rgb(0, 0, 187);">user_access</span><span
style="color: rgb(0, 119, 0);">(</span><span
style="color: rgb(221, 0, 0);">'view agenda'</span><span
style="color: rgb(0, 119, 0);">) && </span><span
style="color: rgb(0, 0, 187);">agenda_type_is_enabled</span><span
style="color: rgb(0, 119, 0);">(</span><span
style="color: rgb(0, 0, 187);">$node</span><span
style="color: rgb(0, 119, 0);">-></span><span
style="color: rgb(0, 0, 187);">type</span><span
style="color: rgb(0, 119, 0);">)) {<br>
</span><span style="color: rgb(0, 0, 187);">$output </span><span
style="color: rgb(0, 119, 0);">= </span><span
style="color: rgb(0, 0, 187);">agenda_list</span><span
style="color: rgb(0, 119, 0);">(</span><span
style="color: rgb(0, 0, 187);">$node</span><span
style="color: rgb(0, 119, 0);">-></span><span
style="color: rgb(0, 0, 187);">nid</span><span
style="color: rgb(0, 119, 0);">); </span><span
style="color: rgb(255, 128, 0);">// This gets a themed table.<br>
// Save output into a node property for retrieval from the
theme layer.<br>
</span><span style="color: rgb(0, 0, 187);">$node</span><span
style="color: rgb(0, 119, 0);">-></span><span
style="color: rgb(0, 0, 187);">agenda_view </span><span
style="color: rgb(0, 119, 0);">= </span><span
style="color: rgb(0, 0, 187);">$output</span><span
style="color: rgb(0, 119, 0);">;<br>
</span><span style="color: rgb(255, 128, 0);">// Store the
data directly into the content array, for default display.<br>
</span><span style="color: rgb(0, 0, 187);">$node</span><span
style="color: rgb(0, 119, 0);">-></span><span
style="color: rgb(0, 0, 187);">content</span><span
style="color: rgb(0, 119, 0);">[</span><span
style="color: rgb(221, 0, 0);">'agenda'</span><span
style="color: rgb(0, 119, 0);">] = array(<br>
</span><span style="color: rgb(221, 0, 0);">'#value' </span><span
style="color: rgb(0, 119, 0);">=> </span><span
style="color: rgb(0, 0, 187);">$output</span><span
style="color: rgb(0, 119, 0);">,<br>
</span><span style="color: rgb(221, 0, 0);">'#weight' </span><span
style="color: rgb(0, 119, 0);">=> </span><span
style="color: rgb(0, 0, 187);">15</span><span
style="color: rgb(0, 119, 0);">,<br>
);<br>
}<br>
break;<br>
</span><span style="color: rgb(0, 0, 187);">?></span></span></code></div>
<br>
I'm not sure about my use of $node->agenda_view and
$node->content['agenda'] as I basically copied that code from
another module (signup) which lists items in the event node view in the
format I wish.<br>
<br>
Thanks!<br>
<br>
-ron<br>
<pre class="moz-signature" cols="72">--
Ron Parker
Software Creations <a class="moz-txt-link-freetext" href="http://www.scbbs.com">http://www.scbbs.com</a>
Self-Administration Web Site <a class="moz-txt-link-freetext" href="http://saw.scbbs.com">http://saw.scbbs.com</a>
SDSS Subscription Mgmt Service <a class="moz-txt-link-freetext" href="http://sdss.scbbs.com">http://sdss.scbbs.com</a>
Central Ave Dance Ensemble <a class="moz-txt-link-freetext" href="http://www.centralavedance.com">http://www.centralavedance.com</a>
R & B Salsa <a class="moz-txt-link-freetext" href="http://www.randbsalsa.com">http://www.randbsalsa.com</a>
</pre>
</body>
</html>