List Agenda Items in Event Node

Assigned to:somebody
Created:somebody at Tue, 12/18/2007 - 12:17pm
Status:Open (General Task / Priority 1-High)
Case ID:Public Display: 209-307

The code I've created does get the correct output, but won't write it in the Event node display screen.

List Agenda Items

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;
 

Groups: