By jax on
When you call theme('search_results', $results, 'node') from another module the preprocess function template_preprocess_search_results is not being called.
I'm trying to have the faceted_search module display its results through the same mechanism as the search module but it is strange that I cannot use the search module's theme functions.
Comments
When I removed the
When I removed the
search-results.tpl.phpfile from the theme directory it started working. This is strange behaviour since it does calls the preprocess function for thesearch-result.tpl.phpfile that is still in the theme directory. *boggle*So, finally - how have you
So, finally - how have you themed seperate search result?
Assuming you are talking about faceted search?
Szy.
--
Znajkraj
Well, I created a separate
Well, I created a separate module that themes it completely by itself:
This module provides its own templates so that I can do whatever I want.
Same problem here...
The presence of
search-results.tpl.phpand "existence" oftemplate_preprocess_search_results(&$variables)insearch.pages.incis somehow corelated. Ifsearch-results.tpl.phpis present on the theme directory, thenfunction_exists('template_preprocess_search_results')indicates that this function does not exist. If I removesearch-results.tpl.php(and clear cache) then the functiontemplate_preprocess_search_resultssuddenly exists.Thanks for all the
Thanks for all the groundwork. Between this and http://drupal.org/node/343635 I was able to fix my problem quickly by following your lead.
I also copied template_preprocess_search_results from search.pages.inc and pasted it into my template.php file. This seamed to clear up the search-results.tpl.php not working properly. For reference here's what I put in my template file:
Wow, I have this problem too.
Wow, I have this problem too. crazy