[ic] returning list of categories...properly

Ed LaFrance interchange-users@interchange.redhat.com
Mon Oct 15 13:09:01 2001


At 10:43 AM 10/14/2001 -0700, you wrote:
>I'm working on a site where the user clicks on a product group on the
>homepage, which does a page search and returns another page with a list of
>categories for that product group.  I've played around with a variety of
>different variables in the page search, but I don't seem to be getting
>anywhere.  Although the categories are being returned, instead of getting
>just one category, I'm getting all of them for a particular product group.
>I don't profess to be any good at The Search Engine, so I'm hoping someone
>can let me know what I'm missing.  The code I'm using on the home page to
>initiate the page search is as follows:
>
>[page search="
>   se=Hand Tools
>   sf=prod_group
>   tf=category
>   sp=results2
>   "]
>        Hand Tools
>[/page]

I'm not sure what you are trying to do on results2.html - I could find a 
closing </form> tag on the code your posted - it is just a fragment?

I any case, you could try the mv_unique parameter in your search:

[page search="
   se=Hand Tools
   sf=prod_group
   rf=category
   un=yes
   tf=category
   sp=results2
   "]
        Hand Tools
[/page]

On results2.html:

[search-region]
[search-list]
         [loop-code]  // This will contain the category because of 
rf=category in the search
[/search-list]
[/search-region]

...should give you a list of unique category names which match your search.

- Ed L.



===============================================================
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          eCommerce | Consulting | Hosting
Placerville, CA  95667         edl@newmediaems.com
(530) 622-9421                 http://www.newmediaems.com
(866) 519-4680 Toll-Free       (530) 622-9426 Fax
===============================================================