Would it be possible to link to a demonstration site so that we can see how the regions and divs are set up?

I've tried many different configurations but haven't got it working yet. No error messages, just no ajaxifaction (if that's a word!)

CommentFileSizeAuthor
#2 mycustomsearch.zip1.02 KBscotjam

Comments

Anonymous’s picture

Title: Demo site » Demo site, better documentation for setting up regions and divs

Good point, yes I should have my personal site up in a week or so. Will add the demo link.

I think a good solution is also to provide a "Devel block" with information to help setup the AJAX.

scotjam’s picture

StatusFileSize
new1.02 KB

Hope this helps!

If you're struggling to get this working, just use the Bartik theme as the code on the project page requires no changes. So, once you've got this up and running with Bartik, try adjusting the code to work with your own theme.

Anonymous’s picture

Ok Thanks! This is a good idea for a README.txt. Will add it soon.

/**
* Implements hook_search_api_ajax_settings().
*/
function mycustomsearch_search_api_ajax_settings() {
  $settings = array(
 
    // required: CSS ID for the main content (search results html)
    'content' => '#content .content',
   
    // required: array of regions with search-related blocks => CSS ID's
    'regions' => array(

      'sidebar_first' => '#sidebar-first',

    ),
   
    // optional: if you want to show a spinner image on AJAX
    'spinner' => drupal_get_path('module', 'search_api_ajax') .'/spinner.gif',
   
    // optional: if you want to scroll-back-to-top on paging search results
    'scrolltarget' => '#main-content',
    'scrollspeed' => 1000,
   
    // optional: fade main content on AJAX (fade=1 for true)
    'fade' => 1,
    'opacity' => 0.3,   
  );
 
  return $settings;
}
erald’s picture

tried to get this to work also but somehow no joy
I have the search form (solr) in the header with autocomplete. Am using the adaptive theme and the header structure is:

<div id=page>
   <header class=clearfix>
      <div class=region>
         <div id="block-search-form">

The results should go into the region with

<div id=main-content>
   <div id=results>

Whatever I put into my module nothing changes. Tried all kinds of things but seems to miss something.

would appreciate it if someone can show me how to make this work

thanks

amandine’s picture

Hello,

I have the same problem, i-e, the ajax doesn't work, and I don't find any solution on the web.

I follow the instruction :
- use Bartik theme
- add the module mycustomsearch

I have 2 facets search in the first side bar.

I would appreciate too if someone can give more precise instruction

Thanks in advance

amandine’s picture

Problem solved. It came from the yui library version which was 3.0.0.

Anonymous’s picture

Status: Active » Fixed

I've improved the README.txt file abit recently.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.