|
|
| ENG/RUS Main :: RiSearch :: RiSearch Pro :: RiCoord :: RiMap :: RiSearch PHP :: RiLax :: Forum |
|
|
|
|
| Introduction :: Manual :: Order :: License |
|
|
Main
RiSearch Pro v.3.2 Manual© S. TarasovTemplate usageScript uses template to control design of script output. Template is placed in file "templates/template.htm". It is standard HTML file, which can be opened by every browser. You may look how your page will be displayed and edit it.
The look of highlighted terms is defined by parameters
Template consists of seven sections: "header" and "footer" will be displayed in every case; "results_header", "results_NN" and "results_footer" are displayed in case of successful search; "no_results" is used if no results are found; "empty_query" will be displayed if there is no query supplied. Please note, that in case of multidatabase search you need separate "results_NN" section for every database (where NN is database number).
Each section divided by marks, like this:
Template uses several predefined parameters, which will be replaced by results of script work. Here is full list of parameters:
Multiple templates
Script can use several templates to print results.
Each additional template should be defined in configuration file:
Use parameter "t=N" (where N is templates number) in query string to use non-standard template for results printing. Additional template features
Sometimes printed information should depend on search results.
For this purpose conditional operators can be used:
Conditions (%condition%) can be written like:
These operators can be used in such way:
Another operator can perform simple arithmetic operations:
For example, next code will print links range in current page:
Other examples can be found in file "demo_template.htm". SSI directivesYou may use simple SSI directives in template. Only <!--#include virtual='file'--> is supported. |
| http://risearch.org | S.Tarasov, © 2000-2003 |