ABC CMS Pro
10.12.2004

Tags list for 'search' module

Note! Every template must begin with <%tloop section%> and finish with <%tendloop section%>
All the other tags are included between them

The module fulfills the search in tables that are selected at the admin panel

The working procedure is as follows
Set the tables where search is permitted at the admin panel. Search parameters (fields where search is performed) are set for each table by a programmer during development process. Search parameters can't be modified at the admin panel.
To post search results create a template with special tags and redirect the search form to the section associated with this template

Note! Delete all comments (i.e. // Page text) before using the templates for site design

The tags are described below


// A form for input search query

// dots '...' should be replaced with section id and page id which are set for displaying search results

<form action="index.php?s=...&p=..." method="post" name="searchform">
<input type="text" value="" name="search_request">
<input type="submit" name="submit" value="Search">
// 'Search' may be replaced with any other name
</form>




/// Publishing search results

// Replace dots '...' with table name where the search is disabled (you may look up for it at the section 'Search')

<%tif search_...%>
<%tloop search_...%>


// Here you may use a list of fields which is different for every table
// You can look up in descriptions of appropriate modules for these fields
// You can place the link to view search results (see the example below)

<%tendloop search_...%>
<%tendif search_...%>

<%tlv search_finded%> // Search finded flag (see examples)


// Example: search in pages

<%tif search_page%>
<%tloop search_page%>


<a href="index.php?s=<%tlv parent%>&p=<%tlv n%>">
<%tlv name%>
</a>

<%tendloop search_page%>
<%tendif search_page%>




// Example: search in news

<%tif search_news%>
<%tloop search_news%>


<a href="index.php?s=17&p=22&selected_news=<%tlv n%>">
<%tlv head%>
</a>

<%tendloop search_news%>
<%tendif search_news%>

// Example: nothing finded

<%tif !search_finded%>

Nothing Finded!

<%tendif search_finded%>