We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31229
    • 19 Posts
    hi everyone
    i am new to MODX and i need to Customize the ajaxsearch results output with &tplResults chunck. can anyone show me how to do a little change to results output?

    tnx smiley
      MODx Development
      Windows, Photoshop CS3, Dreamweaver CS3, Flash, PHP 5.2, MySQL 5.0, Evo 1.0.x, Firefox 4, Chrome 8, IE 8, Opera 10
      • 5811
      • 1,717 Posts
      Which kind of changes would you like doing ?
        • 24482
        • 9 Posts
        I’m in the same boat. I need some help. I’m trying to do an ajaxsearch, and display each result with ajax.

        I have a chunk called search_playlists. In the chunk is the following code:
        [!AjaxSearch? &ajaxSearch=`1` &tplAjaxResult=`search_result_playlist` !]

        In my search_result_playlist chunk I have the following code:
        <p>Result: [+longtitle+] - <a href="[+url+]">Read More</a></p>

        However, it won’t actually display the longtitle or url variable. Does anyone know why? It’s driving me mad.
          • 5811
          • 1,717 Posts
          In my search_result_playlist chunk I have the following code:
          <p>Result: [+longtitle+] - <a href="[+url+]">Read More</a></p>
          To display the longtitle and the url of the search result use:
          <p>Result: [+as.longtitle+]  - <a href="[+as.resultLink+]">Read More</a></p>