function zenophile_sidebars_form_zenophile_create_alter in Zenophile 7
Same name and namespace in other branches
- 6.2 zenophile_sidebars/zenophile_sidebars.module \zenophile_sidebars_form_zenophile_create_alter()
Implements hook_form_FORM_ID_alter().
File
- zenophile_sidebars/
zenophile_sidebars.module, line 12 - Adds controls to adjust the width and placement of the sidebars and page in themes created with Zenophile.
Code
function zenophile_sidebars_form_zenophile_create_alter(&$form, $form_state) {
if (isset($form['advanced_fset'])) {
$form['advanced_fset']['sidebars_fset'] = array(
'#title' => t('Adjust sidebar widths and placement'),
'#type' => 'fieldset',
'#collapsible' => FALSE,
'#collapsed' => FALSE,
'#weight' => 30,
'sidebars_on' => array(
'#type' => 'checkbox',
'#title' => t('Override sidebar and page widths and placement'),
'#description' => t('If checked, a new CSS file named “sidebars.css” will be added to the new theme which will attempt to adjust the widths and placement of your sidebars and page regions using the values below. The default values assume the STARTERKIT starter theme is being used; this feature may not work properly with other starter themes.'),
'#weight' => 0,
),
'page' => array(
'#title' => t('Page wrapper width (#page)'),
'#type' => 'textfield',
'#size' => 4,
'#field_suffix' => 'px',
'#default_value' => '960',
'#description' => t('This value is ignored if your theme will have a liquid layout.'),
'#weight' => 10,
),
'sidebar-left' => array(
'#title' => t('First sidebar width (div.region-sidebar-first)'),
'#type' => 'textfield',
'#size' => 4,
'#field_suffix' => 'px',
'#default_value' => '200',
'#weight' => 20,
),
'sidebar-right' => array(
'#title' => t('Second sidebar width (div.region-sidebar-second)'),
'#type' => 'textfield',
'#size' => 4,
'#field_suffix' => 'px',
'#default_value' => '200',
'#weight' => 30,
),
'sidebar-pos' => array(
'#title' => t('Sidebar positioning'),
'#type' => 'radios',
'#options' => array(
'normal' => t('Sidebars on their respective sides'),
'left' => t('Both sidebars on left of main area'),
'right' => t('Both sidebars on right of main area'),
),
'#default_value' => 'normal',
'#weight' => 40,
),
);
}
}