Skip to content

Instantly share code, notes, and snippets.

@ramlev
Created March 4, 2011 09:52
Show Gist options
  • Save ramlev/854413 to your computer and use it in GitHub Desktop.
Save ramlev/854413 to your computer and use it in GitHub Desktop.
<?php
function ding_facetbrowser_theme() {
return array(
'facetbrowser' => array(
'variables' => array(
'facets' => NULL,
'searchkey' => NULL,
),
),
);
}
function theme_facetbrowser($all_facets = FALSE, $search_key =NULL ) {
error_log(print_r($search_key,1));
// $search_key = NULL here
}
}
function ding_facetbrowser_block_view($delta = FALSE) {
...............
$results = module_invoke($executed_search_module, 'ding_facetbrowser');
// $results->searchkey = 'zorro' here
$block_content = theme('facetbrowser', $results->facets, $results->searchkey);
...............
return $block;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment