diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b9135374c78445de4feed9bec9e2e949ff0bae07..7e3bbbe891311086fa2555f50ec623b047dd5662 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,6 @@ Zen 7.x-3.x-dev, xxxx-xx-xx (development release) --------------------------- +- #812480 by Garrett Albright and JohnAlbin: Make "Jump to Nav" link configurable - #1135120: PHP notice about undefined $highlight variable on maintenance-page.tpl - #705264 by grendzy: Allow Zen (and subthemes) to be used without a database - #774838: Add view_mode class to node.tpl diff --git a/STARTERKIT/STARTERKIT.info.txt b/STARTERKIT/STARTERKIT.info.txt index e2cdecc27fecf65ef63558f66c6924061c425c2a..57ddd3526d88a10816aaa8109ae29537d3ecb1c7 100644 --- a/STARTERKIT/STARTERKIT.info.txt +++ b/STARTERKIT/STARTERKIT.info.txt @@ -118,6 +118,7 @@ settings[zen_breadcrumb_separator] = ' › ' settings[zen_breadcrumb_home] = 1 settings[zen_breadcrumb_trailing] = 1 settings[zen_breadcrumb_title] = 0 +settings[zen_jump_link_target] = main-menu settings[zen_rebuild_registry] = 1 settings[zen_wireframes] = 0 diff --git a/template.php b/template.php index 6bb40ef931dabb68ad5ffaea4822463db40b09e9..6b51ab89c191cba14e2b5d5dc7363023420de3e7 100644 --- a/template.php +++ b/template.php @@ -210,6 +210,7 @@ function zen_preprocess_html(&$variables, $hook) { $variables['classes_array'][] = 'page-panels'; break; } + $variables['jump_link_target'] = theme_get_setting('zen_jump_link_target'); } /** diff --git a/templates/html.tpl.php b/templates/html.tpl.php index 75b11912a96a696dd31b1c0ba698de46a4f95d64..2f04b8967d133b290977265573228d5674e68944 100644 --- a/templates/html.tpl.php +++ b/templates/html.tpl.php @@ -25,6 +25,8 @@ * - $styles: Style tags necessary to import all CSS files for the page. * - $scripts: Script tags necessary to load the JavaScript files and settings * for the page. + * - $jump_link_target: The HTML ID of the element that the "Jump to Navigation" + * link should jump to. Defaults to "main-menu". * - $page_top: Initial markup from any modules that have altered the * page. This variable should always be output first, before all other dynamic * content. @@ -69,7 +71,7 @@ > diff --git a/theme-settings.php b/theme-settings.php index 2659a684c981e3da6d7a587749f668a4bc20f85c..98d0371ea8309284e8de52b818a8b6e173246166 100644 --- a/theme-settings.php +++ b/theme-settings.php @@ -86,6 +86,13 @@ function zen_form_system_theme_settings_alter(&$form, $form_state) { ), '#default_value' => theme_get_setting('zen_layout'), ); + $form['themedev']['zen_jump_link_target'] = array( + '#type' => 'textfield', + '#title' => t('Anchor ID for “Jump to Navigation” link'), + '#default_value' => theme_get_setting('zen_jump_link_target'), + '#field_prefix' => '#', + '#description' => t('Specify the HTML ID of the main navigation menu; this will be used by the accessible-but-hidden “Jump to Navigation" link at the top of each page.'), + ); $form['themedev']['zen_wireframes'] = array( '#type' => 'checkbox', '#title' => t('Add wireframes around main layout elements'), diff --git a/zen.info b/zen.info index d50f7c7f341b18528c0d056ae7767fd33779edb8..4aa45c6c4fb4cb1b225a8ead111f9b63afd7b2d7 100644 --- a/zen.info +++ b/zen.info @@ -23,5 +23,6 @@ settings[zen_breadcrumb_home] = 1 settings[zen_breadcrumb_trailing] = 1 settings[zen_breadcrumb_title] = 0 settings[zen_layout] = zen-columns-liquid +settings[zen_jump_link_target] = main-menu settings[zen_rebuild_registry] = 0 settings[zen_wireframes] = 0