There is a handwritten search module for drupal.
The question is how from the function my_search_submit to transfer an array to the function that displays information on the screen. The writing below. There must be a normal way, but I can not find it.

//Описание блоков function my_search_hblock($op = 'list', $delta = 0, $edit = array()){ switch ($op) { case 'list': $blocks[0] = array( 'info' => t('Поиск GM'), ); $blocks[1]= array( 'info' =>t('Результат поиска'), ); return $blocks; case 'view': switch ($delta) { case 0: $block['content'] = my_search_page();//форма для поиска break; case 1: $block['content'] = my_search_result_contents();//результат поиска break; } return $block; } } //Сам сабмитер function my_search_form_submit($form, &$form_state){ //некоторый код container($keywords); } function container($result=NULL){ /** * Это что-то типа контейнера * Если в функцию передана переменная--то её данные заносятся в сессию * Если ничего не переданно--то из сссии извлекаются данные, сама сессия обнуляться. **/ if(is_null($result)){ $result=$_SESSION['result']; unset($_SESSION['result']); return $result; }elseif(!is_null($result)){ $_SESSION['result']=$result; } } function my_search_result_contents(){ $result=container(); $output = theme('search', $result); return $output; } 

    1 answer 1

    Actually the question is closed. The lead programmer came and said that right after the submitter there was a hiader. So the data really need to cram into the session and juzat. At the same time I showed the scheme of the form in "Pro Drupal Development" Also there was an option to shift all the work with processing to Ajax or Jay Query, and the submitter will do echo html. Who has the right to close the topic, pliz.