[ic] Small Search Box: How to ignore a field in products.txt?

L C iluvsnm2 at yahoo.com
Tue Aug 14 11:54:35 EDT 2007


On Mon, 2007-08-13 at 09:12 -0700, L C wrote:
> In products.txt, under prod_group, I have a group of
> items which I've labeled "database only."
> 
> I do not want these items showing up in any search
> results.
> 
> What do I need to add to the code below
> (small_search_box component) to have the search
ignore
> any items defined as 'prod_group=database only'. 
I'm
> such a nubie so I kindly ask you to be specific! 
I've
> tried so many different things to no avail.
> 
> Thanks and Blessings,
> Lisa
> 

Here is what I do.

If I understand right, there are records that you do
not want to show up
in any search results.  The way I do it is not in the
form at all. but
in the results page.  In the database, you should have
a field with 1 or
0 as a flag something like "hide_this_record" then in
the search-list
simply do a test for that field, 

something like this in the results search-region
should do it:

[search-list]
[tmp hide_this_record][item-data products
hide_this_record][/tmp]

[if !scratch hide_this_record]
  <tr><td>
    [item-data products description]...
  </td></tr>
[/if]
[/search-list]

Also, the results code that you would modify is in:
cat-root/templates/components/results_buylist

I have done these kind of modification for nla items,
pending items,
etc...
rick



Rick,

Thank You and this makes perfect sense to work with
the results page and not the small_search_box
component.  I, however, use the results_grid
(perl-based) not the buylist so I'll see what damage I
can do with that!  ...The group will probably be
hearing from me again in a few days!

Blessings,

Lisa



       
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC


More information about the interchange-users mailing list