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

    I must edit many parameters in the AjaxSearch snippet. Sometime there is a modx upgrade with a newer version of AjaxSearch. When I upgrade after this I must edit all the parameters in AjaxSearch again, right? Or I have AjaxSearch in a multi-language site with texts included in parameters in more than one language. Must I have this snippet multiple with parameters for each language? undecided

    Shouldn’t be there a chance to edit parameters outside the snippet? With saving this parameters in the database? Or am I wrong and have misunderstood AjaxSearch? huh
      • 25663 MODX Staff
      • 12,272 Posts
      You’re confused as to how it works i think. Do not modify the parameters in the code, but reference them in the calls you make to the snippet in your pages. Upgrades don’t touch those.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 24495
        • 407 Posts
        Confused a bit more now grin
        If I’m right I can call parameters like &showMoreResults or &addJscript with the snippet for instance
        [!AjaxSearch? &AS_showForm=`0`!]


        But how I should call parameters like $searchButtonText, $paginationTextMultiplePages and so on? As I said above I work on a multi-language site (de/en) and need to have all texts in both languages. As I read about AjaxSearch 1.5 this version can handle dependencies on the manager interface language. But that’s not a solution because it’s only one language and where I can get the other?
        confused, confused undecided
          • 15987
          • 786 Posts
          rasc,
          in version 1.5 the other language files still need to be created. I however only know English (at one point I had a decent grasp of Spanish, but its been too long). So if other people start translating the language file that is include with 1.5 I will include them. I think once 0.9.6 is out and 1.5 is included people will start getting all of it translated.
            • 24495
            • 407 Posts
            Hi kylej, you can grab the german language file here saved as txt.

            But how I can handle AjaxSearch in a single website with two document trees in "de" and "en"?
            The web site I build up this time has two "master" folders in the root (de and en) including a tv that determines the specific language for the tree. All child documents inside the trees check for needed language dependent parameters/content parts/whatsoever this tv and set accordingly the right pieces.
            CAN AjaxSearch handle two languages in one single web site?
              • 15987
              • 786 Posts
              in the snippet call you can set the parameter &language

              so for the German part you would have &language=`german`

              and for the English part just have &language=`english`

              if this parameter is not specified it gets the language specified in the manager and looks to see if the file exists for that language.

                • 24495
                • 407 Posts
                Great, will give it a try. Tnx for your work and help.