*But based on the concepts from Panels
and Panels Everywhere in Drupal 7
user/%
) will provide select list for choosing user context.Super easy and familiar for themers
name = Fancy pants
type = layout
backdrop = 1.x
regions[header] = Header
regions[top] = Top
regions[content] = Content
regions[sidebar] = Sidebar
regions[footer] = Footer
Improved and more powerful!
function book_block_info() {
$blocks['navigation'] = array(
'info' => t('Book navigation'),
'description' => t('Shows the table of contents for a book.'),
);
return $blocks;
}
function book_block_info() {
$blocks['navigation'] = array(
'info' => t('Book navigation'),
'description' => t('Shows the table of contents for a book.'),
'required contexts' => array('node' => 'node'),
);
return $blocks;
}
function book_block_view($delta = '') {
$node = menu_get_object();
$block = array();
if ($node) {
$book_mode = variable_get('book_mode', 'all_pages');
$block['subject'] = t('Table of Contents');
$block['content'] = _book_toc($node, $book_mode);
}
}
return $block;
}
function book_block_view($delta = '', $settings, $contexts) {
$node = $contexts['node'];
$block = array();
if ($node) {
$book_mode = $settings['book_mode'];
$block['subject'] = t('Table of Contents');
$block['content'] = _book_toc($node, $book_mode);
}
}
return $block;
}
hook_block_configure()
, all forms within a single function.
function book_block_info() {
$blocks['navigation'] = array(
'info' => t('Book navigation'),
'description' => t('Shows the table of contents for a book.'),
'required contexts' => array('node' => 'node'),
'class' => 'BookNavigationBlock',
);
return $blocks;
}
class BookNavigationBlock extends Block {
function getTitle() {
return = t('Book navigation')
}
function getContent() {
return _book_toc($this->contexts['node'], $this->settings['book_mode']);
}
function form($form, &$form_state) {
return _book_configure_form($form, $form_state);
}
}
All block callbacks within a single class. No other hooks (hook_block_view(), hook_block_configure(), etc. are necessary.
state_set('upgrade_layout_name', 'your_layout_name');
IRC: #backdrop
http://backdropcms.org
github.com/backdrop/backdrop
@backdropcms
Chick in hand: http://allnightershop.blogspot.com/2013/09/farmlife.html