We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4960
    • 6 Posts
    Be default, the ajaxSearch snippet displays the page title as the search result title. I would like to change this to display the Menu Title or the Summary (Intro Text) by default instead. I found the template file (assets/snippets/ajaxSearch/includes/templates.inc.php), and the code on line 27
    <a class="[+as.resultLinkClass+]" href="[+as.resultLink+]" title="[+as.longtitle+]">[+as.pagetitle+]</a>

    But I have no idea where these place holders are defined and I don’t know how to pull the Menu Title or Summary from the pages. Any help would be greatly appreciated!
      • 5811
      • 1,717 Posts
      To use [+as.intro+] instead of [+as.pageTitle+], in the version 1.7.1 you should change the line 194 in the file ajaxSearch.php and line 499 in the file includes/snippet.ajaxSearch.inc.php. Define [+as.intro+] in the template and change the code lines.

      But, I will deliver the version 1.8 of AjaxSearch, this week. This new release will offer a better templating with the use of PHx. So, except if it is urgent, I suggest you to wait a lot.
      Find enclosed, the 1.8 readme.txt in preparation (draft version).
        • 4960
        • 6 Posts
        Excellent! Thanks for the tips as well as the information about the new release. I can wait a week or so for the new version, so I think I will take you up on that suggestion.