> Main > Products and Services > Purchase > Company
English / Russian

Documentation

CNSearch 1.5.1

© "CN-Software" Ltd. 2002-2008
support@cn-software.com
www.cn-software.com
Previous | Table of Contents  | Next

Using Various Templates

The system allows using various templates for creating different search interface modifications and exploiting different indexes during the search process. To use several templates, you should set up the 'template' parameter in the source code of the search form. If the 'template' is not set up, standard 'cnsearch.conf' template is used.

Any optional name can be used for a template. A template's name should be composed only of Latin letters (upper or lower case) and Arabic numbers; it is not necessary to add 'conf'.

Correct variant:

<input type="hidden" name="template" value="black">

Incorrect variant:

<input type=hidden name="template" value='../black'>

<input type=hidden name="template" value='red.htm'>

Below is the example of a template allowing a user to:

The following way to index files is defined in the template:

::CONFIG path=/home/www/search/en

Example:

-- en.conf ---------------------------------------------

::CONFIG path=/home/www/search/en

::CONFIG regcode = Enter Your registration code here

::CONFIG stats = password

::CONFIG content-type = text/html

::CONFIG NonStrictMatch = [non strict match]

::CONFIG StopWords =, Ignored Words :

::CONFIG SearchType = Combined

 

::HTMLTOP

<HTML>

<HEAD>

<TITLE>Search results - %Q</TITLE>

</HEAD>

<BODY>

<table width=400 height=40 align=center bgcolor=#C0C0C0>

<form action="%F" method=get><tr><td align=center>

<input type=text name=q size=40 maxlength=64 value="%Q">

<input type=submit value="Search">

<select name=template>

<option value="en">English

<option value="es">Spanish

<option value="ru">Russian

</select>

</td></form></tr></table>

Documents found: %O

 <B>%O</B><font color=gray>%W<B>%P</B></font><br>

<br>

<div align=right>

Sort by: <a href="%A">date</a> | <a href="%L">relevancy</a>

</div>

 

::HTMLRESULT

<HR>

<UL>

<LI>%N. <a href="%U" target=_new>%T</A> <small>

      <font color=red>%S</font> [Relevancy: %R]</small>

<UL>

<LI>%E

<LI>%D

<LI>%C

<LI><a href="%U" target=_new>%u</A>

</UL>

</UL>

 

::HTMLNOTFOUND

<P><font color=red>%Q not found</font>

 

::HTMLBOTTOM

%B

</BODY>

</HTML>

-- end of en.conf ---------------------------------------


Previous | Table of Contents  | Next