function _node_gallery_view in Node Gallery 6
Implementation of hook_nodeapi(op='view').
File
- ./
node_gallery.module, line 224 - Node gallery module file.
Code
function _node_gallery_view(&$node, $teaser, $page) {
if (gallery_config_gateway::get_types('image', $node->type)) {
$config = gallery_config_gateway::get_by($node->gid, 'id');
$gallery = new Gallery(array(
'nid' => $node->gid,
));
if ($config->content_display == 'gallery') {
$node->content['body']['#value'] = $gallery
->get_content($teaser);
$tmp = $node->content['body'];
unset($node->content);
$node->content['body'] = $tmp;
}
}
}