We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26172
    • 14 Posts
    Hi There. In Evo 1.0.8 using ajax search snippet and have followed the instructions on: http://modx.com/extras/package/ajaxsearch. I have created a landing page (resource) with the snippet call: [!AjaxSearch? &showInputForm=`0`&showResults=`1`&ajaxSearch=`1`!]

    I also created a chunk for the Search and have the following there:

    <div class="header_soc_search clearfix">
    <div class="header_search">
    [!AjaxSearch? &showResults=`1` &landingPage=`20` &showMoreResults=`1` &moreResultsPage=`20`!]
    </div>

    When I do a test search it generates results, but it shows up on the same page instead of going to a separate page. For example, if I'm on the home page and do a search, the results show there and push everything down below the header. I can't figure out what I'm doing wrong. I am a newbie so I'm still trying to figure out how all this works. Can someone please help me?

    This question has been answered by multiple community members. See the first response.

    [ed. note: saplingdesigns last edited this post 10 years, 6 months ago.]
    • discuss.answer
      To show the results in a separate page you need to turn the AJAX part of AjaxSearch off for the search form:
      [!AjaxSearch? &ajaxSearch=`0` &landingPage=`20`!] 


      Then on your landing page you need another AjaxSearch snippet call to process the search form's values and (optionally) not show the form again:
      [!AjaxSearch? &ajaxSearch=`0` &showInputForm=`0`!]


        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 26172
        • 14 Posts
        Quote from: sottwell at Oct 11, 2013, 05:22 AM
        To show the results in a separate page you need to turn the AJAX part of AjaxSearch off for the search form:
        [!AjaxSearch? &ajaxSearch=`0` &landingPage=`20`!] 


        Then on your landing page you need another AjaxSearch snippet call to process the search form's values and (optionally) not show the form again:
        [!AjaxSearch? &ajaxSearch=`0` &showInputForm=`0`!]



        Thank you Sottwell! This worked great for getting the results onto a second page. Unfortunately, now there are two sets of results showing up - one above and below the nav menu (see screenshot). Any ideas on what I may be doing wrong?
        • discuss.answer
          You need to specify &showResults=`0` in the upper right snippet. I presume this is in your template.

          This may prove useful, although I'm not sure if there are more recent versions available now.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 26172
            • 14 Posts
            Quote from: sottwell at Oct 11, 2013, 08:28 PM
            You need to specify &showResults=`0` in the upper right snippet. I presume this is in your template.

            This may prove useful, although I'm not sure if there are more recent versions available now.

            Thank you Sottwell. I will try this.
              • 26172
              • 14 Posts
              That worked! I'm very thankful for your help Sottwell smiley. Any chance you could help me on a few other issues I am having?