I have a custom search form written in my custom-module. On submit, i have used do_search api and then I have made some modifications/customization with the results.
Now having my customized results, how can I render them?
Work so far--->
In custom-module.module
function custom_module_search_ticket_form_submit($form, $form_state) { // do_search() // customizations (in the sense, removed few results according to my requirements. Otherwise the result-object/array format is same as of core search results) return theme('rootcandy_my_search_results', $results, $type); } function custom_module_theme() { return array( 'rootcandy_my_search_result' => array( 'arguments' => array('result' => NULL, 'type' => NULL), 'template' => 'rootcandy-my-search-result', ), 'rootcandy_my_search_results' => array( 'arguments' => array('results' => NULL, 'type' => NULL), 'template' => 'rootcandy-my-search-results', ), ); }
Rootcandy is the theme I have used. In rootcandy's template.php
function rootcandy_preprocess_rootcandy_my_search_results (&$vars) { // copied lines from core search module's search.pages.inc function template_preprocess_search_results(&$vars) } function rootcandy_preprocess_rootcandy_my_search_result (&$vars) { // copied lines from core search module's search.pages.inc function template_preprocess_search_result(&$vars) }
Under rootcandy theme folder, Added below tpl.php files
rootcandy-my-search-results.tpl.php (copied from core search's search-results.tpl.php) rootcandy-my-search-result.tpl.php (copied from core search's search-result.tpl.php)
Now I have done this much, clearing cache, after everything; Submitting my custom-search-form renders nothing, other than the form. When I print my customized results, they are fine. Theming part is not working.
Where is the mistake? Plz help !