You are here

function hook_ds_layout_info in Display Suite 7

Same name and namespace in other branches
  1. 7.2 ds.api.php \hook_ds_layout_info()

Define layouts from code.

Return value

$layouts A collection of layouts.

3 functions implement hook_ds_layout_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

ds_ds_layout_info in ./ds.module
Implements hook_ds_layout_info().
ds_forms_ds_layout_info in modules/ds_forms/ds_forms.module
Implements hook_ds_layout_info().
ds_test_ds_layout_info in tests/ds_test.module
Implements hook_ds_layouts_info().
1 invocation of hook_ds_layout_info()
ds_get_layout_info in ./ds.module
Get Display suite layouts.

File

./ds.api.php, line 393
Hooks provided by Display Suite module.

Code

function hook_ds_layout_info() {
  $path = drupal_get_path('module', 'foo');
  $layouts = array(
    'foo_1col' => array(
      'label' => t('Foo one column'),
      'path' => $path . '/layouts/foo_1col',
      'regions' => array(
        'foo_content' => t('Content'),
      ),
      'css' => TRUE,
      // optional, form only applies to node form at this point.
      'form' => TRUE,
    ),
  );
  return $layouts;
}