We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14942
    • 7 Posts
    Hello,

    Is there someway to implement website search without using the AjaxSearch snippet? I want to implement website search but do not want to use AJAX.

    Thanks,
    Jatinder
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      [!AjaxSearch? &ajaxSearch=`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
        • 14942
        • 7 Posts
        Thanks for the reply but thats not what I wanted to ask.

        Right now I have the Search Form in the left column of the website. When I search for something, the search results are displayed below the form itself.

        I want the search results to appear in the main content area and with pagination. Similar to any other normal website search module.

        Thanks,
        Jatinder
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: js_thind at Jan 27, 2007, 10:41 AM

          Thanks for the reply but thats not what I wanted to ask.
          sottwell answered precisely what you asked...
            • 14942
            • 7 Posts
            I will try explain myself more clearly.

            Please goto http://search.mnogo.ru/ and search for something in the search form on the top. The search results are displayed in the main page and also has pagination.

            Is this possible with MODx ?

            I tried [!AjaxSearch? &ajaxSearch=`0`!], but it still displays the search results under the search form itself.

            Regards,
            Jatinder
              • 33372
              • 1,611 Posts
              The AjaxSearch snippet should return results that look almost exactly like the page you linked to if you use the code that Susan gave you. Can you give us a link to the site you’re working on so we can see what might be going on? If you click on the link to show more results at the bottom of the ajax results do you then see the results as you want them?
                "Things are not what they appear to be; nor are they otherwise." - Buddha

                "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                I think what you need to do is use the AS_landing option to have a new page open for the search results. Create the document to display search results (this document’s ID is the one you use for the value of AS_landing) and put another AjaxSearch snippet call with the appropriate arguments.

                Look at the documentation for all the options you might want to add to the two calls to get the results you want.
                  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
                  • 14942
                  • 7 Posts
                  Thanks Susan. Thats exactly what I wanted.

                  I just realized that most of the snippet usage documentation is within the snippet code itself.

                  I need another small help.

                  When I search for some term, I get a list of URLs and the text extract of the related page. When I click on the URL the related page is displayed with all the search terms in the page’s content highlighted.

                  The problem is that its also applying highlights to my Template Variables thus renaming them in the process. Setting extract to 0 solves the problem, but it also removes extracts from the search results page.

                  I want the extracts on the search results page but don’t want the search terms highlighted on the pages itself. Any suggestions?

                  Thanks,
                  Jatinder
                    • 15987
                    • 786 Posts
                    just delete the searchhighlighting plugin, that should solve your problem.
                      • 14942
                      • 7 Posts
                      Thanks Kylej.