1 layout.api.php | hook_layout_info() |
Deprecated. Now replaced by hook_layout_template_info().
Deprecated
since 1.30.0
Related topics
File
- core/
modules/ layout/ layout.api.php, line 73 - Describe hooks provided by the Layout module.
Code
function hook_layout_info() {
$layouts['my_layout'] = array(
'title' => t('A custom layout'),
'path' => 'layouts/my_layout',
'regions' => array(
'header' => t('Header'),
'content' => t('Content'),
'sidebar' => t('Sidebar'),
'footer' => t('Footer'),
),
// Optional information that populates using defaults.
// 'preview' => 'preview.png',
// 'stylesheets' => array('all' => array('one-column.css')),
// 'template' => 'layout--my-layout',
// Specify a file containing preprocess functions if needed.
// 'file' => 'my_layout.php',
);
return $layouts;
}