[Solved] Search Module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: Search Module

Post 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
Last edited by RonnyK on Tue Aug 07, 2007 6:53 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: Search Module

Post 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
Last edited by RonnyK on Tue Aug 07, 2007 8:02 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: Search Module

Post 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}
Post Reply

Return to “Modules/Add-Ons”