3 if (module_exists('book')) {
5 * Plugins are described by creating a $plugin array which will be used
6 * by the system that includes this file.
10 'title' => t('Book navigation'),
11 'icon' => 'icon_node.png',
12 'description' => t('The navigation menu the book the node belongs to.'),
13 'required context' => new
ctools_context_required(t('Node'), 'node'),
14 'category' => t('Node'),
18 function ctools_node_book_nav_content_type_render($subtype, $conf, $panel_args, $context) {
19 $node = isset($context->data
) ?
clone($context->data
) : NULL
;
20 $block = new
stdClass();
21 $block->module
= 'book_nav';
23 $block->title
= t('Book navigation');
25 $block->content
= isset($node->book
) ?
theme('book_navigation', $node->book
) : '';
26 $block->delta
= $node->nid
;
29 $block->content
= t('Book navigation goes here.');
30 $block->delta
= 'unknown';
36 function ctools_node_book_nav_content_type_admin_title($subtype, $conf, $context) {
37 return t('"@s" book navigation', array('@s' => $context->identifier
));
40 function ctools_node_book_nav_content_type_edit_form($form, &$form_state) {
41 // provide a blank form so we have a place to have context setting.