Home » Forum


No announcement yet.

[CGI] store template in a different location

  • Filter
  • Time
  • Show
Clear All
new posts

  • [CGI] store template in a different location

    Hi there,

    for indexing an intranet application, I use the CGI Version to perform searches. The template file (search_template.html), the search script (search.cgi) and the index files (*.zdat) are located in www/cgi-bin/ - my application resides in the directory www/app/

    I use apache as web server and because of an ScriptAlias entry in my httpd.conf, everything works as expected

    My question is about the current template location: My web application is written in PHP and follows the MVC pattern. Therefore, I also have a views/ directory inside this web app folder structure.

    I use Git for version control and deployment (app/ folder only), so it would be really nice to select the template which will be used inside of Zoom.

    Can I specify a custom location for the search template? Instead of using www/cgi-bin/search_template.html I want to use www/app/views/search/zoom_template.html without copying everything else (search script, database files).

    Thanks in advance!

  • #2
    You can't change the location of the search template file. However, there's a workaround solution for this.

    You can modify the contents of your search_template.html file by removing everything, such that there's nothing in the file except for the tag:

    Now you can create a wrapper PHP search page as described here:

    And you can place this anywhere, including as you required (for example):

    Where this customized "search.php" (you can call it whatever you like) will do a virtual call to the CGI. And you can edit this page to suit your MVC pattern.

    NOTE: Make sure to follow the other instructions at the end of that FAQ, regarding changing the "Link back URL" setting so that the internal links from the CGI will point back to your MVC search page, as opposed to the CGI.
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine