function ds_extras_ds_layout_settings_alter in Display Suite 7.2
Same name and namespace in other branches
- 7 modules/ds_extras/ds_extras.module \ds_extras_ds_layout_settings_alter()
Implements hook_ds_layout_settings_alter().
File
- modules/
ds_extras/ ds_extras.module, line 279 - Display Suite extras main functions.
Code
function ds_extras_ds_layout_settings_alter($record, $form_state) {
if (isset($form_state['values']['additional_settings']['ds_page_title']['ds_page_title_options']['page_option_type']) || isset($form_state['values']['page_option_type'])) {
// Save page title view type
if (isset($form_state['values']['additional_settings']['ds_page_title']['ds_page_title_options']['page_option_type'])) {
$record->settings['hide_page_title'] = $form_state['values']['additional_settings']['ds_page_title']['ds_page_title_options']['page_option_type'];
}
else {
$form_state['values']['page_option_type'];
}
// Save page title
if (isset($form_state['values']['additional_settings']['ds_page_title']['ds_page_title_options']['page_option_title'])) {
$record->settings['page_option_title'] = $form_state['values']['additional_settings']['ds_page_title']['ds_page_title_options']['page_option_title'];
}
else {
$record->settings['page_option_title'] = $form_state['values']['page_option_title'];
}
}
if (isset($form_state['values']['additional_settings']['hide_sidebars'])) {
$record->settings['hide_sidebars'] = $form_state['values']['additional_settings']['hide_sidebars'];
}
}