http://printspiration.com
I have the main search in the header and it is available on all pages. Here is the call:
[!AjaxSearch? &ajaxSearch=`0` &AS_showResults=`0` &AS_landing=`8` !]
I have also created custom templates for the layout and results and paging. Here they are:
<!-----------------template.tpl----------------------->
[+as.showForm:is=`1`:then=`
<form [+as.formId+] action="[+as.formAction+]" method="post">
<div class="search">
<label>Search</label>
<span><input id="ajaxSearch_input" class="cleardefault" type="text" name="search" value="[+as.inputValue+]"[+as.inputOptions+] /></span>
<input id="ajaxSearch_submit" type="image" src="assets/templates/printspiration/images/btn-search.gif" alt="Search" name="search" value="[+as.inputValue+]"[+as.inputOptions+] />
</div>
</form>
`+]
[+as.showIntro:is=`1`:then=`
<p class="ajaxSearch_intro" id="ajaxSearch_intro">[+as.introMessage+]</p>
`+]
[+as.showResults:is=`1`:then=`
[+as.results+]
`+]
<!-----------------Paging.tpl----------------------->
[+as.tpl:is=`paging`:then=`
<span class="ajaxSearch_paging">
[+as.pagingLinks+]
</span>
`+]
[+as.tpl:is=`pagingLinks`:then=`
<a href="[+as.pagingLink+]" class="ajaxSearch_page">[+as.pagingText+]</a>
`+]
[+as.tpl:is=`pagingLinksCurrent`:then=`
<span class="ajaxSearch_currentpage">[+as.pagingText+]</span>
`+]
<!-----------------result.tpl----------------------->
<li>
<div class="inner">
<span class="photo"><a href="[+as.resultLink+]" title="[+as.longtitle+]"><img src="assets/pageimgs/[+as.id+]/category-img.jpg" alt="[+as.longtitle+]" width="174" height="174" /></a></span>
<span class="btm"> </span>
<strong><a href="[+as.resultLink+]">[+as.pagetitle+]</a></strong>
<span>[+as.design_firm:ne=``:then=`[+as.design_firm+]`+]</span>
</div>
<div class="btm"> </div>
</li>
<!-----------------results.tpl----------------------->
[+as.noResults:is=`1`:then=`
<div class="[+as.noResultClass+]">
[+as.noResultText+]
</div>
`:else=`
<p class="ajaxSearch_resultsInfo">[+as.resultInfoText+]</p>
[+as.paging+]
<ul class="browsing-list">
[+as.listResults+]
</ul>
[+as.paging+]
`+]
The first search (from the hompage for example) works. Try searching on "zero"
But then try and search from the Results page (try "OXO")
You will see that it now searches on what I have set as the Default text in the Lang file. and does not chnge the search results. The result page is NOT cached.
$_lang['as_boxText'] = 'What are you looking for?';
Here is the call on the Results page:
[!AjaxSearch? &ajaxSearch=`0` &order=`pagetitle` &AS_showForm=`0` &grabMax=`16` &extract=`0`!]
The site using jQuery BTW.
Thoughts?