By default, search results are displayed using the search_results.html and link.html templates. But what if I wanted to add a second set of templates (example: search_results2.html and link2.html) to display the results differently? Is that possible?
Oct 22, 2002, 12:47 AM
Veteran / Moderator (18436 posts)
Oct 22, 2002, 12:47 AM
Post #2 of 11
Views: 3770
You would really need a new template set (you could just do the appropriate search templates, and not the resd). Create a new folder, in the /templates/ folder, say something like 'search2', and then upload the other templates to that folder. CHMOD it to 777, and the files within it to 666. Then whenever a search is run, you need to add this to the end of it;
&t=default2
This tells links SQL to use templates set 'default2'.
Hope that helps
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!
&t=default2
This tells links SQL to use templates set 'default2'.
Hope that helps

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!
Oct 22, 2002, 9:07 AM
Veteran / Moderator (18436 posts)
Oct 22, 2002, 9:07 AM
Post #4 of 11
Views: 3738
I suppose, another way, would be to pass another variable, i.e template_name, which is checked for in the seach templates. i.e.;
<%if search_template eq "temp1"%>
template stuff for 'temp1' design...
<%endif%>
<%if search_template eq "temp2"%>
template stuff for 'temp2' design...
<%endif%>
You will the need to add some hidden tags to pass this along to the other appropriate search templates...
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!
<%if search_template eq "temp1"%>
template stuff for 'temp1' design...
<%endif%>
<%if search_template eq "temp2"%>
template stuff for 'temp2' design...
<%endif%>
You will the need to add some hidden tags to pass this along to the other appropriate search templates...
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!
Oct 22, 2002, 9:47 AM
User (324 posts)
Oct 22, 2002, 9:47 AM
Post #5 of 11
Views: 3725
Thanks Andy. I've already experimented with this. It requires a ton of if statements in the search_results.html and links.html files. It would work, but also not very efficient. It also prevents you from using a html program to edit the templates.
I'm really quite surprised that I'm the first in need of this solution. I can think of many practical uses for it: Printer friendly views, compressed summary vs. more details, larger fonts for visually impaired, table view, etc...
I'm really quite surprised that I'm the first in need of this solution. I can think of many practical uses for it: Printer friendly views, compressed summary vs. more details, larger fonts for visually impaired, table view, etc...
Oct 22, 2002, 10:52 AM
Veteran / Moderator (2199 posts)
Oct 22, 2002, 10:52 AM
Post #6 of 11
Views: 3720
You can use my PageBuilder plugin to create all those additional link pages you want (you can also create additional category pages, with a list of links). Maybe the plugin would be something for you.
Ivan
-----
Iyengar Yoga Resources / GT Plugins
Oct 22, 2002, 11:19 AM
User (324 posts)
Oct 22, 2002, 11:19 AM
Post #7 of 11
Views: 3714
Hmm, yes, I do own that. I didn't even think to look to see if your plugin would do the trick. So how would I use the plugin allow me to toggle between the different search result views?
Last edited by:
Katana Man: Oct 22, 2002, 11:20 AM
Oct 22, 2002, 11:37 AM
Veteran / Moderator (2199 posts)
Oct 22, 2002, 11:37 AM
Post #8 of 11
Views: 3699
The search result can be handled by modifying your link.html template to
<%if query%>
[ how the link should look for search results ]
<%else%>
[ how the link should look by default ]
<%endif%>
I was referring to print pages, pages for the visually handicapped, when I said the plugin can be used to create those pages
Ivan
-----
Iyengar Yoga Resources / GT Plugins
<%if query%>
[ how the link should look for search results ]
<%else%>
[ how the link should look by default ]
<%endif%>
I was referring to print pages, pages for the visually handicapped, when I said the plugin can be used to create those pages

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Oct 22, 2002, 12:52 PM
User (479 posts)
Oct 22, 2002, 12:52 PM
Post #9 of 11
Views: 3701
Hallo Yogi,
actually I'm also thinking about a solution for my needs ....
I want to use a shopping-card. At the category listing, people see small images of the articles, at the detailed pages they will see a larger, more detailed picture.
My idea is ... at the detailed-page, users can click a link to see a XXL-image of the article. I don't want to use a popup-window to display the XXL-image. I would like that the detailed-page reload with the larger image.
I would need to have 2 different detailed-pages, because I need to change the design of the reloaded page.
You know what I mean?
Michael
--
Michael Skaide
http://www.cycle24.de
actually I'm also thinking about a solution for my needs ....
I want to use a shopping-card. At the category listing, people see small images of the articles, at the detailed pages they will see a larger, more detailed picture.
My idea is ... at the detailed-page, users can click a link to see a XXL-image of the article. I don't want to use a popup-window to display the XXL-image. I would like that the detailed-page reload with the larger image.
I would need to have 2 different detailed-pages, because I need to change the design of the reloaded page.
You know what I mean?
Michael
--
Michael Skaide
http://www.cycle24.de
Oct 22, 2002, 1:05 PM
Veteran / Moderator (2199 posts)
Oct 22, 2002, 1:05 PM
Post #10 of 11
Views: 3691
Are you using static pages or dynamic pages?
If you are using dynamic pages, you can just pass along a key in your query string, and in the template display the things you want according to the value of the key in the query string.
I.e. you could make your links point to
page.cgi?Detailed/123.html;
for the normal detailed page, and for the one with the XXL image, you would use
page.cgi?Detailed/123.html;size=XXL
Then in the detailed.html template, you use something like
<%if size eq 'XXL'%>
....
<%else%>
....
<%endif%>
If you are using static pages, the easiest solution is the pagebuilder plugin, where you can just define a link page with a separate template (e.g. detailed_xxl) and then have the plugin build the pages where you want (e.g. Detailed/123-XXL.html).
Ivan
-----
Iyengar Yoga Resources / GT Plugins
If you are using dynamic pages, you can just pass along a key in your query string, and in the template display the things you want according to the value of the key in the query string.
I.e. you could make your links point to
page.cgi?Detailed/123.html;
for the normal detailed page, and for the one with the XXL image, you would use
page.cgi?Detailed/123.html;size=XXL
Then in the detailed.html template, you use something like
<%if size eq 'XXL'%>
....
<%else%>
....
<%endif%>
If you are using static pages, the easiest solution is the pagebuilder plugin, where you can just define a link page with a separate template (e.g. detailed_xxl) and then have the plugin build the pages where you want (e.g. Detailed/123-XXL.html).
Ivan
-----
Iyengar Yoga Resources / GT Plugins