t('CTools example no context content type'), 'description' => t('No context content type - requires and uses no context.'), // 'single' => TRUE means has no subtypes. 'single' => TRUE, // Constructor. 'content_types' => array('no_context_content_type'), // Name of a function which will render the block. 'render callback' => 'no_context_content_type_render', // The default context. 'defaults' => array(), // This explicitly declares the config form. Without this line, the func would be // ctools_plugin_example_no_context_content_type_edit_form. 'edit form' => 'no_context_content_type_edit_form', // Icon goes in the directory with the content type. 'icon' => 'icon_example.png', 'category' => array(t('CTools Examples'), -9), // This example does not provide 'admin info', which would populate the // panels builder page preview. ); /** * Run-time rendering of the body of the block. * * @param $subtype * @param $conf * Configuration as done at admin time. * @param $args * @param $context * Context - in this case we don't have any. * * @return * An object with at least title and content members. */ function no_context_content_type_render($subtype, $conf, $args, $context) { $block = new stdClass(); $ctools_help = theme('advanced_help_topic', array('module' => 'ctools', 'topic' => 'plugins', 'type' => 'title')); $ctools_plugin_example_help = theme('advanced_help_topic', array('module' => 'ctools_plugin_example', 'topic' => 'Chaos-Tools--CTools--Plugin-Examples', 'type' => 'title')); // The title actually used in rendering. $block->title = check_plain("No-context content type"); $block->content = t("