Skip to content

Instantly share code, notes, and snippets.

@rom3r4
Last active August 29, 2015 14:06
Show Gist options
  • Save rom3r4/422f2077d20db3962c3d to your computer and use it in GitHub Desktop.
Save rom3r4/422f2077d20db3962c3d to your computer and use it in GitHub Desktop.
Carrot2 + Solr integration on ODS site.
/**
* Override or insert variables into the search template.
*
* @param $variables
* An array of variables to pass to the theme template.
*/
function ods_02_preprocess_search_results(&$variables) {
if (!empty($variables['module'])) {
if ($variables['module'] == "apachesolr_search") {
unset($variables['results']);
unset($variables['search_results']);
unset($variables['description']);
unset($variables['pager']);
}
}
}
@rom3r4
Copy link
Author

rom3r4 commented Sep 5, 2014

Snippet added at the end of /www/beta/sites/all/themes/ods_02/template.php

'ods_02' is the latest version of the Theme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment