Gossamer Forum
Home : Products : Gossamer Links : Discussions :

search result tag?

Quote Reply
search result tag?
Hi All-

I know it's silly, but I can't seem to find where to place %% tags on my template if I want to include some info when the search results are 0. Like adding a web search alternative only to appear if we had no results on our site...

I had it like that on my old search template, but can't remember how I did it.

Thanks much!
Quote Reply
Re: [SSmeredith] search result tag? In reply to
It shows up as <%error%> on search.html (not search_results.html, as a lot of people think).

You should be able to get around it with;

Code:
<%if error contains 'No Matching Links'%>
Yahoo (pass <%query%> along to Yahoo as appropriate)
<%endif%>

... in search.html.

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!

Last edited by:

Andy: Jun 18, 2004, 7:01 AM
Quote Reply
Re: [Andy] search result tag? In reply to
nope, doesn't work Frown
Quote Reply
Re: [SSmeredith] search result tag? In reply to
Put <%GT::Template::dump%> in the template, and see what it shows. What does <%error%> contain?

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] search result tag? In reply to
there are only two

error_font <font face="Verdana,Arial MT,Arial,Helvetica" size=2 color=red> error_formatted $VAR = 'CODE(0x8449a90)';

Quote Reply
Re: [SSmeredith] search result tag? In reply to
Can you post/PM me a link, so I can see please?

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: [SSmeredith] search result tag? In reply to
Hi. How does the modified version work?

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] search result tag? In reply to
I forgot about it. It's a global:

sub {
require GT::SQL::Search::Base::Common;
my $STOPWORDS = $GT::SQL::Search::Base::Common::STOPWORDS;
my $tags = shift; my $query = $IN->param('query');
if (exists $STOPWORDS->{$query}) {
return "The search term, '$query', is too common. Please hit your back button and try again.";
}
if ((length $query > 0) && (length $query < 3))
{
return "Your search term, '$query', is too short. Please hit your back button and try again.";
}
return $tags->{error}; # Display default error
}
Quote Reply
Re: [SSmeredith] search result tag? In reply to
This global rejects shot terms like "a" "the" stuff like that. So, back to how to include stuff when there is an error. I want to add a outside search box when they don't find anything in the directory. As I said, I used to have it before this global. Any suggestions?

Thanks~~