• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: remove search for a module
PostPosted: Fri Mar 05, 2010 12:15 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Mon Jul 28, 2008 4:54 pm
Posts: 66
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


Top
 Profile  
 
 Post subject: Re: remove search for a module
PostPosted: Sat Mar 06, 2010 12:24 am 
Online
Power Poster
Power Poster
User avatar

Joined: Wed Sep 05, 2007 8:03 pm
Posts: 3647
Location: The Netherlands
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.

_________________
Get nice guestbook messages from your site visitors with the brand new Gbook module.
Integrate Piwik Web Analytics in your site admin with the Piwik module.
Extend your global site settings with the Custom Global Settings module.
The Fourth Dutch CMS Made Simple Workshop on April 9 2011 was great fun! Read all about it here
Announcement: The Fifth Dutch CMS Made Simple Workshop coming up?


Top
 Profile  
 
 Post subject: Re: remove search for a module
PostPosted: Tue Mar 30, 2010 4:23 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Feb 08, 2007 6:11 pm
Posts: 481
Location: Florida
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.


Top
 Profile  
 
 Post subject: Re: remove search for a module
PostPosted: Tue Mar 30, 2010 7:37 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu May 14, 2009 8:11 pm
Posts: 1269
Location: Lithuania
@Carasmo to skip search results from "Gallery" module you can modify default search template like this:
Quote:

{$searchresultsfor} "{$phrase}"


{if $itemcount > 0}

    {foreach from=$results item=entry}

    {if (empty($entry->module)) || ($entry->module != 'Gallery')}
  • {$entry->title} - {$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}

_________________
My best friends are: FAQ: How can I debug my code/site ?...showtemplate=false...module_customhow to create a patch, {process_pagedata}
And Yours ? :)


Top
 Profile  
 
 Post subject: Re: remove search for a module
PostPosted: Wed Mar 31, 2010 8:37 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Mon Jul 28, 2008 4:54 pm
Posts: 66
wow, that simple huh? thank you very much Peciura.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting