Hello,
I am using MLE 1.6.6 and the modules Search (1.6.1) and Gallery (1.2) and was wondering how to make the Search module NOT index the gallery folder. Basically i have a gallery that is indexed in my search module, that works perfectly, however, the results always give me and extra link to the image directly in both of my languages. It might be easier to show it
http://www.tillemont.com/eng/home.html? ... mit=Submit
notice I have 3 links,
Fun cakes (which is what i want) --- link to my page
Gallery (which is what i DO NOT want)
Gallery (which is what i DO NOT want)
I only want the "Fun cakes" link
Thank you
remove search for a module
Re: remove search for a module
I guess you can adjust the Search "Result Template". Use some smarty code to filter out the Gallery results. There's allready an example for News in the template code.
Re: remove search for a module
Did you figure this out? I'm having the exact same problem. Since I know pretty much nothing about smarty, I will need to hire someone to write this.
Re: remove search for a module
@Carasmo to skip search results from "Gallery" module you can modify default search template like this:
{$searchresultsfor} "{$phrase}"
{if $itemcount > 0}
{foreach from=$results item=entry}
{if (empty($entry->module)) || ($entry->module != 'Gallery')}
{$entry->title} - url}">{$entry->urltxt} ({$entry->weight}%)
{*
You can also instantiate custom behaviour on a module by module basis by looking at
the $entry->module and $entry->modulerecord fields in $entry
ie: {if $entry->module == 'News'}{News action='detail' article_id=$entry->modulerecord detailpage='News'}
*}
{/if}
{/foreach}
{$timetaken}: {$timetook}
{else}
{$noresultsfound}
{/if}
Re: remove search for a module
wow, that simple huh? thank you very much Peciura.