Page 1 of 1

Re: Search Module

Posted: Tue Aug 07, 2007 6:51 pm
by RonnyK
In the help of Search are the parameters shown that can be called in the calling of search . This one is one of the parameters.

(Extensions -> Search -> Help)
(optional) submit="Submit" - Text to place into the submit button
(optional) searchtext="null" - Text to place into the search box
Ronny

Re: Search Module

Posted: Tue Aug 07, 2007 7:54 pm
by RonnyK
Sven,

the resultpage is done through the "Result template", on of the tabs of the search module. The fields are getting their value from the language file, so if you give no specific language, that is "us_US.php", The Dutch version will show "Zoekresultaten voor", being translated by calling (lang="nl_NL") and the translation is than found in lang/nl_NL.php under the Modules/Search folder.

So you can change the "result template" or the translation.

I think you might want to edit the "result template" logic, to start with the "if itemcount >0 " and than put the text after that. In the else-logic you can create a different title then.

Ronny

Re: Search Module

Posted: Wed Aug 08, 2007 6:16 am
by RonnyK
Sven,

I read your post better this time. You don't want to change the "$searchresultsfor", but the text "$noresultsfound", instead. This is the variable that is put below the header. If you don't want that line of text, to appear if a search doesn't find anything, just change/delete the else-statement, or change the translation in the language-file. This is the code of the "Result template", that can be edited in the "Extensions -> Search", one of the tabs.

Code: Select all

<h3>{$searchresultsfor} "{$phrase}"</h3>
{if $itemcount > 0}
	<ul>
	{foreach from=$results item=entry}
		<li>{$entry->title} - <a href="{$entry->url}">{$entry->urltxt}</a> 
({$entry->weight}%)</li>
	{/foreach}
	</ul>

	<p>{$timetaken}: {$timetook}</p>
{else}
	<p><strong>{$noresultsfound}</strong></p>
{/if}