Skip to content

Commit 1079d80

Browse files
authored
NOJIRA - asu_gcse page title fix (#364) (#365)
1 parent 987b0a6 commit 1079d80

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

profiles/openasu/modules/webspark_featurescustom/asu_gcse/asu_gcse.module

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,16 @@ function asu_gcse_redirect($query, $type) {
6666
} else {
6767
drupal_set_message(t("Please enter a valid search query."), 'error');
6868
}
69+
}
70+
71+
/**
72+
* Implements hook_process_page
73+
* @param $variables
74+
*/
75+
function asu_gcse_process_page(&$variables) {
76+
77+
// Set the 'Search Results' title on search pages
78+
if (arg(0) == 'search') {
79+
$variables['title'] = 'Search Results';
80+
}
6981
}

profiles/openasu/modules/webspark_featurescustom/asu_gcse/js/asu_gcse.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333
// Forced a document title, because it doesn't reflect the h1 title (on both search pages)
3434
document.title = "Search Results | " + asu_site_title;
3535

36-
var thetitle = $('#page-title');
37-
// Set page title (h1) to 'Search Results' (on both search pages)
38-
thetitle.text("Search Results");
39-
4036
// If the first nav pill URL matches the node_search form ('search/node') then proceed
4137
if (first_nav_pill_url && first_nav_pill_url.indexOf(node_search) != -1) {
4238
// Change 'Content' nav pill label to 'This site'

0 commit comments

Comments
 (0)