Site Search Result Template Markup
Version 2.0 of the Search Script introduces a page template for the results page to make it even easier to customise the results page so that it can blend seemlessly into your site.The results template is a file called results.tpl and it simply needs to contain the HTML that you want to use for the results page with a few special code markers to indicate where the actual results values should be inserted into the page.
The following is a list of the values that you can place anywhere in the page to use as placeholders for where you want the corresponding content to be displayed in the results page:
- {search} is an optional value that will display the entered search string.
- {cat} is an optional value that will display the specified category.
- {subject} is an optional value that will display the entered subject string.
- {total} is an optional value that will display the total number of matches found for the search.
- {buttons} is an optional value that determines where the previous/next buttons are to be displayed in the page. If no occurrences of this field appear in the template then only the number of results that will fit on one page will be accessible.
- {builtby} is a mandatory value that determines where the builtby logo is to be displayed in the page (if it is omitted then the builtby logo will be inserted into the page anyway except that you don't get to choose where it goes).
The results template must also contain two {loop} markers around the section of code that is to be repeated to display each result. The following is a list of optional values that you can place between the two {loop} tags to use as placeholders for the actual values associated with an individual result entry:
- {count} the number of this entry within the overall results.
- {num} the number of this entry within the page.
- {title} the title of the results entry.
- {url} the address of the results entry page.
- {desc} the description of the results entry.
- {sub} the subject of the results entry.
- {img} an image tag attaching the thumbnail image associated with the entry (if there is one).
- {match} the number of matches for this entry that determined its position in the search results.


