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

    i can’t get the AjaxSearch to work with the param "parents"!
    Is there anything special about that param?

    This is the call:
    [!AjaxSearch? &AS_showResults=`0` &AS_landing=`54` &addJscript=`0` &ajaxSearch=`1` &language=`english` &parents=`48` &depth=`1`!]

    The page with id "48" is a folder which contains all pages in a specific language.
    The AS Version is 1.81

    Can anyone give me a tip? Thanks in advance.

    See’ya
    Leif
      • 5811
      • 1,717 Posts
      This is the call:
      [!AjaxSearch? &AS_showResults=`0` &AS_landing=`54` &addJscript=`0` &ajaxSearch=`1` &language=`english` &parents=`48` &depth=`1`!]
      Few questions ...
      Which mode do you want use ? ajax mode or non-ajax mode ?
      With &ajaxSearch=`1` which is the default value, you will use the ajax mode. In this case the parameters :
      &AS_showResults=`0` (don’t display the results under the snippet call) and &AS_landing=`54` (display the results of the non-ajax mode search on page #54) are useless

      &addJscript=`0` means that you have added the link to the mootools 1.11 library by yourself in your template. is it right ?
      The default value of the addJscript parameter is set to 1 and link your page with the default MODx mootools library.

      So try first to run the following snippet call :
      [!AjaxSearch? &parents=`48` &depth=`1` &language=`english`!]
      and let me know the results


        • 16903
        • 39 Posts
        Hi coroico,

        thanks for your help..
        I don’t want to use the ajaxSearch mode, so i will set: &ajaxSearch=`0`
        The search results should be displayed on page 54.

        I tried the call:
        [!AjaxSearch? &AS_showResults=`0` &AS_landing=`54` &ajaxSearch=`0`  &language=`english` &parents=`48` &depth=`1`!]


        My document tree looks like that:
        - Root (0)
        -- de (1)
        --- german page 1
        --- german page 2
        --- german page 3
        --- ...
        -- en (48)
        --- english page 1
        --- english page 2
        --- english page 3
        --- ...


        But i still get only the german search results... :-(
        I cant’ see what i’m doing wrong...

        See’ya
        Leif
          • 5811
          • 1,717 Posts
          On your page where you want the search input form :

          [!AjaxSearch? &AS_showResults=`0` &AS_landing=`54` &ajaxSearch=`0` &language=`english`!]

          and on your landing page #54:

          [!AjaxSearch? &AS_showForm=`0` &ajaxSearch=`0` &language=`english` &parents=`48` &depth=`1`!]

          Thanks to add solved in the title when you will get the English results wink
            • 16903
            • 39 Posts
            I will try this out!
            Just another question:
            Is it important to use a different call for the search and the result page?
            I have one template which i use for all the pages. So at the moment there is the same AS call in every page...

            Thanks so far.
            Leif
              • 5811
              • 1,717 Posts
              The most often construction, is a template with the ajaxSearch call to set up the input search form available on all the pages and a dedicated landing page to display the results. In this case the snippet call should be called in the content of the landing page.
                • 16903
                • 39 Posts
                Ok, that did it!
                I missed to adjust the params in the content of the result page... Shame on me! ;-)

                Thanks a lot for your help. Problem solved!

                See’ya
                Leif