daily_view($node, $teaser = FALSE, $page = FALSE)
daily/daily_container.inc, line 201
Implementation of hook_view(): Add extra fields to display.
We add the daily node we need this time.
| Name | Description |
|---|---|
| Daily Container node type functions | All functions which define the node type Daily Container. |
| Hook implementations | Functions that implement standard Drupal hooks. |
<?php
function daily_view($node, $teaser = FALSE, $page = FALSE) {
$node = node_prepare($node, $teaser);
$contained_node = _daily_node_by_tid($node->tid, $node->nr);
if (is_object($contained_node)) {
$node->content['daily_container'] = array(
# TODO: Weight
'#prefix' => '<div class="daily-contained">',
'#value' => node_view(_daily_node_by_tid($node->tid, $node->nr), $teaser, FALSE),
'#suffix' => '</div>',
);
}
else {
# Usually, the calendar display will add the CSS.
_daily_css();
$node->content['daily_container'] = array(
'#value' => '<div class="daily-empty">'. _daily_form_error_no_nodes_found($node->tid) .'</div>',
);
}
return $node;
}
?>