We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36870
    • 13 Posts
    I'm trying to get search results of AjaxSearch displayed on a separate page. Works fine when its on the same page when I use the call

    [!AjaxSearch? &ajaxSearch=`0`!]

    but when I add

    [!AjaxSearch? &ajaxSearch=`0` &AS_landing=`2`!]

    search results page being ID 2. The page the results to be displayed on. I get the error

    AjaxSearch error: AS_landing parameter has been renamed landingPage. Read ajaxSearch_version_192.txt file.

    Pretty stumped seeing as how I followed the modX wiki exactly..

    http://ashleychemical.com/home is page with search box

    http://ashleychemical.com/search is page to display results..

    Any help would be greatly appreciated!! Thank you!! [ed. note: whaus77 last edited this post 14 years, 7 months ago.]
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Change the parameter in the AjaxSearch snippet to &landingPage instead of $AS_landing.
        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
        • 36870
        • 13 Posts
        wow, thank you very very very much Susan... I feel stupid lol, it was telling me in plain English.. guess I panic when I see errors =P

        Now I'm having another issue that isn't making much sense.

        I'm editing the english.inc.php file which contains all the text to edit for ajax Search.

        However when I get to the $_lang['as_paging1Text'] = '%d - %d / %d';

        I change it to $_lang['as_paging1Text'] = ''; its not getting rid of the 1 - 1 / 1

        And also when I don't type anything and hit search the margin and spacing goes all whacky...

        Guess I just need to know how to edit the CSS of it? I tried what the tutorial said but was only able to change the border of the search box... not really any spacing since the 1 - 1 / 1 is not fitting in my header
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Two parameters would have an effect.

          &showPagingAlways - 1 will always show the paging links, 0 will only show them if there is more than one page of items.

          &pagingType - what type of paging will be shown

          Also see the default paging tpls, &tplPaging0 and &tplPaging1 (used with pagingType)

          I'm attaching a handy cheat sheet.
            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
            • 36870
            • 13 Posts
            ok so once again thank you very very much Susan, I'm getting somewhere.

            Just got one little bug that I can't find any info on, probably just missing something simple and dumb...

            But after I search for example 'home' its works great but when I do a different search it keeps searching 'home' even if I type 'sdfasdfsdf' after clearing my cookies???

            Please help =)

              • 28042 ☆ A M B ☆
              • 24,524 Posts
              You have the snippet called uncached?
              [!AjaxSearch ... !]
                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
                • 36870
                • 13 Posts
                I do not have that snippet, so once I get that snippet I just call it right after my ajax search?

                or I call [!AjaxSearch ... !] once I have uncached snippet?
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  I am referring to the AjaxSearch snippet. Is it called uncached, or cached?
                    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
                    • 36870
                    • 13 Posts
                    Ok so it's called with the [! !] which I looked up and is the uncached call? and [[ ]] is the cached call?

                    Is this what your referring to?

                    I'm definitely not understanding something here.
                      • 36870
                      • 13 Posts
                      your awesome, my other call was with the [[ ]] I figured it out, thanks a million AGAIN!! you rock Susan.

                      I had no idea what you were talking about, I did not know there was a difference with the [! [[

                      Thanks again!

                      I'm still seriously stumped on how to get rid of the paging results, 1 - 1 / 1 business... I altered the english.php file like you said in another post. everything else worked except the paging results... couldnt seem to get rid of them.