The code I've created does get the correct output, but won't write it in the Event node display screen.
The code:
function agenda_nodeapi($node, $op, $arg = 0) {
global $form_values;
drupal_set_message(" agenda_nodeapi(..., $op, ...)");
switch ($op) {
case 'view':
drupal_set_message("agenda_nodeapi: viewing node");
// If the user has the view agenda perm and this node is agenda enabled
// display the agenda list.
if (user_access('view agenda') && agenda_type_is_enabled($node->type)) {
drupal_set_message("agenda_nodeapi: add agenda list");
$output = agenda_list($node->nid); // This gets a themed table.
drupal_set_message("agenda_nodeapi: output is $output");
// Save output into a node property for retrieval from the theme layer.
$node->agenda_view = $output;
// Store the data directly into the content array, for default display.
$node->content['agenda'] = array(
'#value' => $output,
'#weight' => 15,
);
}
break;
(c) All Rights Reserved