search - вывод результатов поиска по сайту, сортированных по релевантности
Дополнительные поля результата выборки:
Возможные атрибуты:
<?xml version="1.0" encoding="utf-8"?>
<t:templates xmlns:t="/templates/ns" xmlns="http://www.w3.org/1999/xhtml">
<t:template id="index">
<h1><t:var name="title" editable="yes"/></h1>
<form action="?" method="get">
<t:input type="text" name="q" value="{GET['q']}" />
<input type="submit" />
</form>
<t:search query="{GET['q']}" template="search" />
</t:template>
<t:template id="search">
<t:eval>
USER_VARS['N'] = {N}+1;
USER_VARS['SCORE'] = sprintf('%.2f', {VARS['score']});
USER_VARS['LINK'] = 'http://'.$_SERVER['HTTP_HOST'].'{VARS['link']}';
</t:eval>
<div>[<t:var name="N" />] <t:a><t:var name="title" astext="yes" /></t:a></div>
<div><t:var name="description" astext="yes" /></div>
<div>[Релевантность: <t:var name="SCORE" />] <t:a href="{USER_VARS['LINK']}"><t:var name="LINK" /></t:a></div>
<t:last><t:rule/></t:last>
<t:empty>По вашему запросу ничего не найдено</t:empty>
</t:template>
</t:templates>