Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
uw_fdsu_theme_resp
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_fdsu_theme_resp
Commits
964ef1cf
Commit
964ef1cf
authored
1 year ago
by
Lily Yan
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-6545 Create an admin-only option to remove the 'on this site' search
parent
a60fa1cf
No related branches found
No related tags found
1 merge request
!110
ISTWCMS-6545 Create search options
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
uw_fdsu_theme_resp.theme
+18
-1
18 additions, 1 deletion
uw_fdsu_theme_resp.theme
with
18 additions
and
1 deletion
uw_fdsu_theme_resp.theme
+
18
−
1
View file @
964ef1cf
...
@@ -165,7 +165,10 @@ function uw_fdsu_theme_resp_preprocess_region(&$variables) {
...
@@ -165,7 +165,10 @@ function uw_fdsu_theme_resp_preprocess_region(&$variables) {
// Get the region from variables.
// Get the region from variables.
$region
=
$variables
[
'elements'
][
'#region'
];
$region
=
$variables
[
'elements'
][
'#region'
];
// Set 'search_local' variable if not set.
if
(
!
isset
(
$variables
[
'search_local'
]))
{
$variables
[
'search_local'
]
=
theme_get_setting
(
'search_show_local'
,
'uw_fdsu_theme_resp'
);
}
// Variables that we want to have access to regardless of region.
// Variables that we want to have access to regardless of region.
$variables
[
'branding_level'
]
=
theme_get_setting
(
'wcms_branding_level'
,
'uw_fdsu_theme_resp'
)
?
theme_get_setting
(
'wcms_branding_level'
,
'uw_fdsu_theme_resp'
)
:
'full'
;
$variables
[
'branding_level'
]
=
theme_get_setting
(
'wcms_branding_level'
,
'uw_fdsu_theme_resp'
)
?
theme_get_setting
(
'wcms_branding_level'
,
'uw_fdsu_theme_resp'
)
:
'full'
;
// The menu style is set based on selection if the level is 'full'.
// The menu style is set based on selection if the level is 'full'.
...
@@ -249,6 +252,20 @@ function uw_fdsu_theme_resp_form_system_theme_settings_alter(&$form, FormStateIn
...
@@ -249,6 +252,20 @@ function uw_fdsu_theme_resp_form_system_theme_settings_alter(&$form, FormStateIn
return
;
return
;
}
}
// Fieldset for search options.
$form
[
'search_options'
]
=
[
'#type'
=>
'details'
,
'#open'
=>
TRUE
,
'#title'
=>
t
(
'Search options'
),
];
// Search options checkbox field.
$form
[
'search_options'
][
'search_show_local'
]
=
[
'#type'
=>
'checkbox'
,
'#title'
=>
t
(
"Show the 'on this site' search option"
),
'#default_value'
=>
theme_get_setting
(
'search_show_local'
,
'uw_fdsu_theme_resp'
)
??
TRUE
,
];
// Fieldset for colour scheme.
// Fieldset for colour scheme.
$form
[
'colour_scheme'
]
=
[
$form
[
'colour_scheme'
]
=
[
'#type'
=>
'details'
,
'#type'
=>
'details'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment