Gossamer Forum
Home : Products : Gossamer Links : Discussions :

How to create multiple sets of search results

Quote Reply
How to create multiple sets of search results
Can anyone suggest a creative and practical solution to this?

I initially set up my search results template to deliver results in a certain format - really only designed for them to be retrieved remotely from other sites. That has been running for a while and makes it impossible to now change that format.

I would really now like to show search results within the site, but in a different format. How can I have 2 sets of search results?
I added the "practical" qualifier because I looked at doing this with an additional template set, but it looked like I would have to maintain a complete duplicate set of templates even though only 1 or 2 are need for this solution.

Any other creative suggestions?

Thanks!
Quote Reply
Re: [CrazyGuy] How to create multiple sets of search results In reply to
Hi,

How about passing a variable in?

i.e

search.cgi?remote=1;query=foo%20bar

..and for a normal search

search.cgi?query=foo%20bar

....and then in search_results.html, you could wrap some <%if ..%> tags around;

Code:
<%if remote%>
remote stuff here
<%else%>
normal stuff here
<%endif%>

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] How to create multiple sets of search results In reply to
That's exactly the kind of creativity I was hoping for.

Off to check out how that might work ...


[later]

works great - and gives me a whole bunch of other ideas :)

Many thanks

Last edited by:

CrazyGuy: Jun 20, 2005, 6:01 AM