Library Information Technology

Add Search Function

Add in Code

   Sites > All > Modules > Custom > yul_search > yul_search.module

  1. In function yul_search_block_info() > add one block line information
  2. In function yul_search_view($delta = '') > add new case
  3. Add function yul_(***)_search_block_content()
  4. In function yul_search_forms() > Add $forms[**] = array(......
  5. Add function yul_(***)_search_box($form, $form_state, $form_id)
  6. Add function yul_(***)_search_box_form_submit($form, &$form_state)

Create in View

  • Create a searh view page that will display the search result with "Filter Criteria"
  • Advance > Exposed Form > Exposed form in block "yes" => search block will created