[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Adding a category header to results page
At 07:52 AM 3/15/2002 -0600, you wrote:
>Here is my problem: I am trying to set up my results.html page so that it
>can identify what the category is and produce a unique header according to
>that category. I found some code in one of the back postings that seems to
>work...
>
>[if explicit]
>[condition]
>$category = '[item-field category]';
>return 1 if $category eq Accent;
>return 0;
>[/condition]
>Accent page header
>[else]
>Not Accent page
>[/else]
>[/if]
>
>(Although I understand I may have some problems putting in multiple else
>statements....but for another time)
>
>My problem is I have to put this statement within the [search-list] tags for
>it to correctly read the [item-field category] and when inside the
>[search-list] it ends up repeating with each product listing on the page
>instead of just showing once as a header at the top. Please help me, I know
>I'm missing the obvious answer here. How else can I read the category
>listing for the page??????
>
>Thanks,
>
>Nikki
What happens when the search returns multiple categories? I suggest you
take a different approach; the [item-change] tag was designed for things
like this. When used in conjunction with tf=category in your search terms
it can put a header line above each category group quite nicely:
http://interchange.redhat.com/cgi-bin/ic/docfly.html?mv_arg=icdatabase06.12
- 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
===============================================================