Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Search results for links in multiple categories

Quote Reply
Search results for links in multiple categories
I was wondering if there is a way to display each category that a link is listed in when it is searched for. This would be very helpful for users that have multiple category listings to make sure that they are listed in the appropriate categories.

Quote Reply
Re: Search results for links in multiple categories In reply to
Hi,

No, currently this would require modification to the code, there isn't any built in way to do this.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Search results for links in multiple categories In reply to
Alex,

Couldn't this be done via plug-in or global variable?

Just do a lookup on the Link ID in CatLinks, then take the results and Join them to the Category table ??

If I'm not missing anything, I might do this one, since I've really wanted to do this for the editor/admin area.



PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://LinkSQL.com/FAQ


Quote Reply
Re: Search results for links in multiple categories In reply to
Hmm, not easily. This is where using loops would be great as then your search results would look like:

Your search returned <%link_hits%> results:

<%loop link_results%>
<p><%Category%>
<p><%include link.html%>
<%endloop%>

but you could easily add a function here:

<%Plugins::Something::format_category%>

which would format the category to display multiples like you want.

That said, it will require me making changes to search.cgi to support loops. However, I can't do this without breaking peoples templates. I'm looking into different ways of doing this.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Search results for links in multiple categories In reply to
Pugdog - If you figure something out regarding this type of search, please let me know so that I can try to implement it. Thanks for your help.

Cheers,
Jesse
jesseh@gravityfed.com