If you want to customize the Look of your Search, you have change the two config values “templates/application.header” and “templates/application.footer”.
Since BIGACE 2.4 it is quite easy to integrate the Search into your Website design, cause it is completely based on Smarty now.
The following configuration keys are used by the Search:
In most cases, you should be able to displya the Search results in your page design, by using your header and footer includes!
There are currently two templates used by the Search. The header displays everything BEFORE and the footer displays everything AFTER the search formular and results.
The following variables are independent from your real search:
The next values depend on whether a search was performed or not:
Last but not least:
If you use a custom Template, you should use your own stylesheet by using the {stylesheet} TAG.
You could even customize the complete Search formular and the Search result by editing the Template “APPLICATION-SEARCH”.
If you want to search from a global formular from your website, you can pass the following POST parameter:
And here, for the ones more familiar with Copy & Paste
a simple search formular:
<script type="text/javascript"> {literal} function doQuickSearch() { if(document.getElementById('s').value.length == 0) { alert('Your searchterm is empty, please enter at least 4 character!'); return false; } else if(document.getElementById('s').value.length < 4) { alert('Your searchterm is to short, please enter at least 4 character!'); return false; } return true; } {/literal} </script> <form action="{link_search id=$MENU->getID()}" method="post" onSubmit="return doQuickSearch();"> <fieldset> <input type="text" name="search" value="" id="s" /> <input type="hidden" name="language" value="{$MENU->getLanguageID()}" /> <input type="submit" value="Search" id="searchbutton" name="searchbutton" /> </fieldset> </form>
Note: The Javascript could easily be skipped and is NOT required.
The returned results are an array of associative arrays:
{foreach from=$results item="searchResult"}
<p>
<a title="{$searchResult.name}" href="{$searchResult.url}">{$searchResult.name}</a>:<br>
{$searchResult.description}
</p>
{/foreach}
The following keys are (at least) set for each result: