Gossamer Forum
Home : Products : Gossamer Links : Discussions :

difference between query and keyword2?

Quote Reply
difference between query and keyword2?
In v2.0.5, some of the templates' search forms name the text input box as "query" while others name it "keyword2." I'm not having much luck finding references to what the intended use of the two is. The Yahoo templates seem to use "keyword2" for category template searches (with the optional search only this category), but the category templates in the 'default' template set uses the "query" version.

Lines 43-46 in Search.pm seem relevant:

# If query is set we know we are searching.
defined $args->{'query'} and ($args->{query} =~ /\S/) and return search();

# Otherwise, if we pass in a field name, we can search on that too.


I can't find any reference to "keyword2", but it sounds like it is supposed to be some way of naming a searchable field?

Furthermore, in my limited testing, the "keyword2" doesn't return any search results...

Dan
Quote Reply
Re: [Dan Kaplan] difference between query and keyword2? In reply to
It sounds like 'keyword2' is something GT had in their database, that was a field in their Links table. Change "keyword2" to a field name in your database and see if it works.

Alex had pointed out in another message, 'query' is the search item you should use, and 'term' is escaped, so it's less useful.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [Dan Kaplan] difference between query and keyword2? In reply to
Hi,

No, keyword2 is a typo in one of the other templates. I had thought it was all removed. You should only ever user query.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] difference between query and keyword2? In reply to
Thanks for the quick replies and clarification. I saw the other post stating that 'query' is the correct term to be using, but the topic seemed a bit different and I didn't want to steal the thread. Smile

Dan
Quote Reply
Re: [Dan Kaplan] difference between query and keyword2? In reply to
Hi,

On the search results page, you can use <%query%> to display what the user searched for or <%term%> which will be URL encoded (for linking to other search engines).

Different issues. =)

Cheers,

Alex
--
Gossamer Threads Inc.