Panels Pane region restriction
Component ID
2884154
Component name
Panels Pane region restriction
Component type
module
Maintenance status
Development status
Component security advisory coverage
not-covered
Downloads
34
Component created
Component changed
Component body
Restrict panel panes availability per layout/region based on tags.
Usage example
Layout plugin definition
$plugin = array(
'title' => t('Custom Landing Page'),
'category' => t('Custom layouts'),
'icon' => 'landing_page.png',
'theme' => 'custom_landing_page',
'regions' => array(
'top' => t('Top'),
'menu_bar' => t('Menu bar'),
'main' => t('Main'),
'sidebar_left' => t('Sidebar left'),
'sidebar_right' => t('Sidebar right'),
),
'tags' => array(
'top' => array(),
'menu_bar' => array(),
'main' => array('full_width'),
'sidebar_left' => array('one_column', 'embed_code'),
'sidebar_right' => array('one_column'),
),
);
Custom pane - ctools plugin of "content_types" type
$plugin = array(
'single' => TRUE,
'title' => t('Full-width pane'),
'description' => t('Provides full-width pane'),
'category' => 'Custom category',
'edit form' => 'full_width_pane_edit_form',
'render callback' => 'full_width_pane_render',
'tags' => array('full_width'),
);
This "Full-width pane" will be available only for the "Main" region of the "Custom Landing Page" layout.
