You are here

function ds_get_layout in Display Suite 6.3

Same name and namespace in other branches
  1. 7.2 ds.module \ds_get_layout()
  2. 7 ds.module \ds_get_layout()

Load a layout

2 calls to ds_get_layout()
dsDisplay::getLayout in includes/dsDisplay.php
Load a layout from hook_ds_layouts, and assign region variables
ds_get_regions in ./ds.module
Load regions for a layout

File

./ds.module, line 411

Code

function ds_get_layout($name = DS_DEFAULT_LAYOUT) {
  $layouts = module_invoke_all('ds_layouts');
  foreach ($layouts as $key => $layout) {
    if ($key == $name) {

      // Every layout has a disabled region
      $layout['regions']['disabled'] = array(
        'name' => t('Disabled'),
      );
      return $layout;
    }
  }
}