MiniVend Akopia Services

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

Re: Can minivend go directly to flypage when the search returns only one item?



******    message to minivend-users from mikeh@minivend.com     ******

Quoting David Ekholm (info@minivend.com):
> 
> Hello everyone,
> 
> I have searched the documentation and the mailing list archive about this
> question.  If it's so simple that no one has bothered to post the answer,
> then please bear with me.
> 
> Is there an easy way to get minivend to go to the flypage for an item when
> the search returns only one item?  For an example of what I'm referring to,
> try searching for a unique book on Amazon.com.  This seems like an obvious
> option but I can't find it anywhere in the docs.
> 
> I've tried to put my flypage code in the results page as in:
> 
> [if value mv_search_match_count < 2]
> 
> [search-list] (flypage stuff) [/search-list]
> 
> [else]
> 
> [search-list] (result page stuff) [/search-list]
> 
> [/else][/if]
> 
> This works OK for a few items, but is really slow if > 20 items are returned
> by the search.  I guess that minivend must go through the entire
> [search-list] (flypage stuff) [/search-list] routine even though I want the
> [if] tag to bypass this when there is more than 1 item.  The [if] tag
> apparently just prevents the result from getting to the browser.

Surround each [search-list] with [search-region]  [/search-region]
and it should only do the substitution once. Make sure to put the
[no-match] [/no-match] section inside those.

-- 
Mike Heins                          http://www.minivend.com/  ___ 
                                    Internet Robotics        |_ _|____
                                    131 Willow Lane, Floor 2  | ||  _ \
It's a little-known fact            Oxford, OH  45056         | || |_) |
that the Y1K problem caused         <mikeh@minivend.com>     |___|  _ <
the Dark Ages. -- unknown           513.523.7621 FAX 7501        |_| \_\
-
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: