Skip to main content

User account menu

  • Log in
Home

Software Creations

Main navigation

  • Home
  • Support
  • Search
  • Articles
  • Projects
  • SolrAI Projects

Breadcrumb

  • Home
By somebody | Tue, 12/18/2007 - 11:17 am
List Agenda Items in Event Node

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;
 

Public
On

(c) All Rights Reserved