function _popup_node in Popup 7
Same name and namespace in other branches
- 8 includes/popup.api.inc \_popup_node()
- 7.x includes/popup.api.inc \_popup_node()
- 6.x includes/popup.api.inc \_popup_node()
1 call to _popup_node()
- _popup_nodereference_render_group in modules/
popup_nodereference/ includes/ popup_nodereference.util.inc
File
- includes/
popup.api.inc, line 297
Code
function _popup_node($attributes, $return = FALSE) {
$node = node_load($attributes['node']);
if ($node) {
$title = isset($attributes['title']) && $attributes['title'] ? $attributes['title'] : $node->title;
if ($return == 'title') {
return $title;
}
$mode = isset($attributes['teaser']) && $attributes['teaser'] ? 'teaser' : 'full';
$node_view = node_view($node, $mode);
$body = drupal_render($node_view);
if ($return == 'body') {
return $body;
}
return popup_element($title, $body, $attributes);
}
}