I’m also trying to use this snippet with the non-Ajax. I am feeling a little stupid because I can’t seem to get this to work properly. I have my search form located in the header, and if I leave
[+as.showResults:is=`1`:then=`
[+as.results+]
in the layout.tpl.html file, then it shows all of my results in the header, thus breaking the layout AND in the body of the page I have created for the search results to display. If I remove that bit of code in layout.tpl.html then the results are removed in both spots. Maybe this is because the search form is being displayed twice on the page, the code in the header (which is part of my template) and the code in the content area of the post? Logic tells me that I need to attach the results template to the snippet included in the content of my search page, but I can’t seem to figure out how to do that using the uploaded files vs. chunks. I’d prefer to keep it that way instead of moving them all to chunks if possible.
[!AjaxSearch? &ajaxSearch=`0` &AS_showForm=`0` &grabMax=`20` &tplResult=`'@FILE:'assets/snippets/ajaxSearch/templates/result.tpl.html` !]
I’ve also tried several other configurations with tick marks and single quotes, etc. I’ve looked at the Wiki page and copied directly what they have and nothing works.
// Off topic rant // One thing that is kind of frustrating about ModX is that the steps on how to use these things is not really very clearly outlined. I would consider myself pretty "together" when it comes to these sorts of things. It took me about 3 hours just to figure out how to use Ditto. Once I figured it out, it’s wonderful... but I had to find most of my help off ModX’s Wiki & forums in order to make use of it.