Search Site          
 
Home  

Chapter 13. Template design

This chapter is assuming that you are using the CGI front end.

How the results page is created

The file etc/search.htm consists of a number of blocks delimited by HTML comments that start with <!--comment--> and end with <!--/comment-->.

The <!--variables--> block is only used by search.exe. The other blocks form part of the results output depending on the situation.

The blocks <--top--> and <!--bottom--> are always returned to the user as the top and bottom part of the output respectively.

There are three series of <!--restop-->, <!--res--> and <!--resbot--> blocks. The first series is returned to users that have requested long results (default), the second one to those that have requested short results and the third one to those that have requested results as URL only. All three blocks must be present in search.htm. Furthermore there is a series of navigation blocks and the blocks <!--notfound-->, <!--noquery--> and <!--error-->. The latter are returned occasionally instead of results.

Any HTML that is outside the pre-defined blocks in search.htm is completely ignored.

Thus, the output of search.exe will always be something like this:



  top                 
  restop                top                   top                 top
  res            or     notfound   or    error     or     noquery
  resbot                bottom             bottom           bottom
  (navigation)
  bottom

The navigation part is built in the same way, with the elements that pertain to each results page. For example, <!--navleft--> and <!--navright--> are used to link to the previous and next results pages, while <!--navXXX_nop--> is used when there are no more pages in one or either direction.




Copyright © 2000-2011 Lavtech.Com Corp.