README.txt 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. Ajaxify Search API pages.
  2. 1. INSTALLATION AND CONFIGURATION
  3. This Ajax module does not understand your theme CSS id's by default. You must
  4. implement a custom module hook to let it know about your theme.
  5. For example, create and enable a custom mymodule.module containing this code:
  6. <?php
  7. /**
  8. * Implements hook_search_api_ajax_settings().
  9. */
  10. function mymodule_search_api_ajax_settings() {
  11. $settings = array(
  12. // CSS id for main content (search results html)
  13. // format: content => CSS id
  14. 'content' => '#content .content',
  15. // CSS id's for regions containing search blocks
  16. // check your region names in mytheme.info
  17. // format: region_name => CSS id
  18. 'regions' => array(
  19. 'sidebar_first' => '#sidebar-first',
  20. 'sidebar_second' => '#sidebar-second',
  21. ),
  22. // OPTIONAL: if you want to provide an AJAX spinner
  23. // this paht is for a default spinner path provided with this module
  24. // @note: see the search_api_ajax.css
  25. 'spinner' => drupal_get_path('module', 'search_api_ajax') .'/spinner.gif',
  26. // OPTIONAL: if you want to use scroll-to-top functionality when paging
  27. // scroll target div
  28. 'scrolltarget' => '#main-content',
  29. 'scrollspeed' => 1000,
  30. // OPTIONAL: if you want to fade search results when Ajaxing
  31. // please set to 1 for TRUE
  32. 'fade' => 1,
  33. 'opacity' => 0.3,
  34. );
  35. return $settings;
  36. }
  37. 2. OPTIONAL: customize YUI3 jquery
  38. If you want to use your custom YUI3 logic, you can override:
  39. theme_search_api_ajax_js()
  40. See search_api_ajax.module