function _popup_node in Popup 7.x
Same name and namespace in other branches
- 8 includes/popup.api.inc \_popup_node()
- 7 includes/popup.api.inc \_popup_node()
- 6.x includes/popup.api.inc \_popup_node()
File
- includes/
popup.api.inc, line 292
Code
function _popup_node($attributes, $return = FALSE) {
$node = node_load($attributes['node']);
$title = $attributes['title'] ? $attributes['title'] : $node->title;
if ($return == 'title') {
return $title;
}
// if ($attributes['panel-display'] && module_exists('ctools')){
// require_once(
// drupal_get_path('module', 'ctools') .
// '/page_manager/plugins/tasks/node_view.inc'
// );
// $body = page_manager_node_view($node);
// } else {
$body = drupal_render(node_view($node, $attributes['mode']));
// }
if ($return == 'body') {
return $body;
}
return popup_element($title, $body, $attributes);
}