function ctools_node_type_desc_content_type_render
Output function for the 'node' content type. Outputs a node based on the module and delta supplied in the configuration.
File
-
plugins/
content_types/ node_context/ node_type_desc.inc, line 22
Code
function ctools_node_type_desc_content_type_render($subtype, $conf, $panel_args, $context) {
$node = isset($context->data) ? clone $context->data : NULL;
$block = new stdClass();
$block->module = 'node_type';
if ($node) {
$type = node_type_get_type($node);
$block->title = $type->name;
$block->content = filter_xss_admin($type->description);
$block->delta = $node->type;
}
else {
$block->title = t('Node type description');
$block->content = t('Node type description goes here.');
$block->delta = 'unknown';
}
return $block;
}