Gossamer Forum
Quote Reply
Search results
I did not get any answer to this question posted to another thread so I thought it might get some result as a thread on its own.

I have numerous templates created for one directory, to call them I utilize the "Category Template", calling the different templates such as:
luna
luna2
luna3 and so on..

What I have not figured out is how to call the different link.html formats to the search results.

Example:


luna: images only no description or links
luna2: column product catalogue layout
luna3: normal link.html layout with description and a detailed page.
Can someone assist in the proper format to call the different templates in the search results? At present I get the defualt layout for all results.


Thank you



Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Search results In reply to
I'm not sure I understand what you want, but in the search form, you can use
Code:
<input type="hidden" name="t" value="luna" />
to bring up search results with a given template.

John
Quote Reply
Re: [gotze] Search results In reply to
When a person searches for say "frog"

The results will show many items but search.cgi only show the default template format even though each link may use different templates. Below is an image or you can view it online @:

http://freezone.ssan.com/cgi-bin/search.cgi?query=frog&+search=SEARCH%21&mh=10&substring=1&bool=or

here is a capture
http://www.ssan.com/0/search_terms.gif
The item with a ."period" is actually a different template and can be viewed normally, until you use the search.cgi


Sandra Roussel
Chonsa Group Design - Fresh Start Housing

Last edited by:

SandraR: Dec 9, 2005, 2:36 PM
Quote Reply
Re: [SandraR] Search results In reply to
Hi,

I'm not sure I have understood what you are describing as an error but here goes.

By the look of your site you are using different templates to display the links in the directory. How do you define which template to display ? I think that this code then needs to be applied to the search results so that it picks up in the same way on the type of link it is and then uses the appropriate template accordingly.

I use a type of link (as a field in the links table) as suggested by another forum user. That way in both the directory or the search results Links displays the appropriate depending on the type of link it is.

Hope this helps,

John
Significant Media
Quote Reply
Re: [Jag] Search results In reply to
Hello,

I call the different templates using the Category field "Category_Template"

I have tried to add the line
<%if Category_Template%> link.html <%else%> link.html

but that did not work. I was hoping someone else ran into this issue for calling the different templates using Search.cgi
Thanks


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Search results In reply to
Hi,

I don't use the category template system. I have a link type that then displays the link in a different manner depending upon the link and is very easy to use anywhere on the site since the link query just compares which type of link it is and displays the appropriate link template.

Without having looked much further into the category template system doesn't your category template just call a different link template. I haven't really got much time at the moment but looking at this post from rgbworld :
http://www.gossamer-threads.com/...i?post=278317#278317

It seems that the category template system does need a different link template per different visual display of a link which seems logical. It seems that you just need to code the search query results to figure out which category it belongs to and use that result to display the appropriate link template. The above post most probably can give you a good idea of what needs to be done.

Again this seems to be a pity to me since it means that you can't have different link types in the same category, but hey that's my just my opinion.

Hope this helps a bit...

John
Significant Media
Quote Reply
Re: [Jag] Search results In reply to
Hello John,

Thank you for the reference -- its exactly what I was seeking.
I must admit the upgrade has caused me many levels of frustration. The CSS template all but gave me high blood pressure.
The linking as you stated prevents multiple link types in a category, causing frustration as well as preventing me from upgrading other sites just to keep my sanity.

As time goes by I am grasping the new template and some development issues, time constraints continues the on going frustration with the upgrade version.


Sandra Roussel
Chonsa Group Design - Fresh Start Housing