function config_pages_content_content_type_render in Config Pages 7
Render the Config Page content.
File
- plugins/
content_types/ content/ content.inc, line 23 - Node content CCT.
Code
function config_pages_content_content_type_render($subtype, $conf, $panel_args, $context) {
if (empty($conf['bundle']) || empty($conf['view_mode'])) {
return;
}
// Use CP from plugin settings if defined.
if ($conf['bundle'] != '_none') {
$bundle = $conf['bundle'];
}
else {
// Use CP from context in another case.
list($config_page) = $context;
if (empty($config_page->data)) {
return;
}
$bundle = array_shift($config_page->data);
}
$content = config_pages_render($bundle, NULL, $conf['view_mode']);
$block = new stdClass();
$block->module = 'config_pages';
$block->delta = $conf['bundle'];
$block->title = '';
$block->content = $content;
return $block;
}