theme-settings.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. function materiobasetheme_form_system_theme_settings_alter(&$form, $form_state) {
  3. if (theme_get_setting('layout_enable_settings') == 'on') {
  4. $form['materiobasetheme']['page_layout'] = array(
  5. '#type' => 'fieldset',
  6. '#title' => t('Page Layout'),
  7. '#description' => t('Use these settings to set the width of the page, each sidebar, and to set the position of sidebars.'),
  8. );
  9. if (theme_get_setting('layout_enable_method') == 'on') {
  10. $form['at']['page_layout']['select_method'] = array(
  11. '#type' => 'fieldset',
  12. '#title' => t('Sidebar Position'),
  13. '#collapsible' => FALSE,
  14. '#collapsed' => FALSE,
  15. );
  16. $form['at']['page_layout']['select_method']['layout_method'] = array(
  17. '#type' => 'radios',
  18. '#description' => t('The sidebar layout descriptions are for LTR (left to right languages), these will flip in RTL mode.'),
  19. '#default_value' => theme_get_setting('layout_method'),
  20. '#options' => array(
  21. 0 => t('<strong>Layout #1</strong> <span class="layout-type-0">Standard three column layout — Sidebar first | Content | Sidebar last</span>'),
  22. 1 => t('<strong>Layout #2</strong> <span class="layout-type-1">Two columns on the right — Content | Sidebar first | Sidebar last</span>'),
  23. 2 => t('<strong>Layout #3</strong> <span class="layout-type-2">Two columns on the left — Sidebar first | Sidebar last | Content</span>'),
  24. ),
  25. );
  26. $form['at']['page_layout']['layout_enable_settings'] = array(
  27. '#type' => 'hidden',
  28. '#value' => theme_get_setting('layout_enable_settings'),
  29. );
  30. } // endif layout method
  31. } // endif layout settings
  32. }