We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14214
    • 299 Posts
    Hope some of you advanced templates can assist me with the best way to handle revising the search box on my site.

    The target code is:

     <div id="search-form">
              <form action="#" method="get">
                <input type="text" class="search-text-box" id="search-box">
              </form>
            </div>


    Where and how do I need to revise the AjaxSearch (will be running this non-ajax) template. Appreciate any help in advance.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      '''&tplLayout '''

      chunk to style the ajaxSearch input form and layout. (optional)

      *string as chunck name
      *string as '@FILE:' + template file path

      e.g: @FILE:assets/snippets/ajaxSearch/templates/myLayout.tpl.html

      '@FILE:'' . AS_SPATH . 'templates/layout.tpl.html
      So create a chunk to use as a tpl. My advice would be to put the default search form into the chunk and make sure it works the same, then start modifying the chunk. The default tpl is assets/snippets/ajaxsearch/templates/input.tpl.html

      See the samples and the readme.txt file in your assets/snippets/ajaxsearch/templates/inputTemplates folder.
        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