| Case number: | 1100-4 |
| Project: | Public Display [1] |
| Opened by: | somebody |
| Status: | Open |
| Assigned: | somebody |
| Priority: | 1-High |
| Type: | General Task |
| Opened on: | Tuesday, December 18, 2007 - 12:17pm |
| Last modified: | Tuesday, December 18, 2007 - 12:17pm |
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;
Links:
[1] http://www.scbbs.com/node/209