Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] Category image and description in results.html



******    message to minivend-users from Handytman@aol.com     ******

FA,
There are at least two ways to do it.
1. If you're calling the search from a 'category name' somewhere, you can 
easily set the search variable mv_search_page to point at a unique results 
page you design just for that particular category. As an example, in a 
one-click search:
[page scan se=Impressionists/sf=category]Impressionist Paintings[/page]
would become:
[page scan se=Impressionists/sf=category/sp=impres_results]Impressionist 
Paintings[/page]
if you've got a search results page (in the same directory as results.html) 
named impres_results.html. You would then hard-code all your 
category-specific goodies into impres_results.html.

2. There is another way, a bit of a hack, which I admit that I use. You only 
need one results page, on which you use the value of mv_searchspec to display 
an image (or whatever.) I keep a special image directory; each category has 
an image there named after it; then:
<snip>
    [if type=file term="server/www/images/categorypix[perl 
interpolate=1]$new_string = '[value mv_searchspec]';$new_string =~ 
s/\W//g;return $new_string[/perl].gif"]
     [then]
        [comment] We're searching for a category or category/subcategory 
[/comment]
        [Unable to display image]
     [/then]
     [else]
        [comment] Searching for a string that isn't a category or cat/subcat 
[/comment]
        [value mv_searchspec]
     [/else]
</snip>

Like I said, it's kindof a hack. However, given that you've taken the trouble 
to create a database table for your categories (I like that idea) why not do 
an in-page search at the top of your results page? Something like:

[loop search="
 fi=catinfo.asc
 se=[value mv_searchspec]
 sf=category
 ml=1
 "]
[loop-code]<-- Category Name -->
[loop-data catinfo catdescription]
[Unable to display image]
[/loop]

You get the picture,

HTH,
Rob Maurer

In a message dated 2/16/00 3:22:29 PM Eastern Standard Time, 
falimoglu@SUNAPEE.cambridgeis.com writes:

> Dear Minivend users,
>  
>  I am trying to have image(s) and description for a given catalog in a
>  results.html page. For this purpose I define another database called 
catinfo
>  with the following columns: category, catdescription and catimg.
>  
>  Could you please let me know how I can have a category image and 
description
>  text in the results.html file?
>  
>  Thank you
>  
>  FA
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: