Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Multiple Template Sets

Quote Reply
Multiple Template Sets
On our directory I am having about 8 different sections and hence am wanting to setup 8 sets of templates, as each category listings will have its unique link properties and different layouts for displaying link.html, detailed.html and other pages.

I can use most of the pages as same for all template sets, however I was wondering if anyone knows exactly what templates I need to create for different sets? in 2.x version of Links SQL I was able to make it work by only creating sets of below pages for its unique category.
  1. category.html
  2. detailed.html
  3. link.html
  4. subcategory.html

Can anyone help me out here?

P.S.. I hope, I was able to use proper words in explaining my concern.

Thanks for the help.

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] Multiple Template Sets In reply to
I would like to add a question that pertains to your request.

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

What I have not figured out is how to call the different link.html formats that I have set up per template in the search results.

Example:

One template will show graphics - with no text or URL

When a person searchs for an image they get the results but the results so nothing as it reverts to the default format.

I have another template that shows the items in columns, but the search results so them in the default mode.

Can someone assist in the proper format to call the different templates in the search results?


Thank you


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Multiple Template Sets In reply to
Bump!


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Multiple Template Sets In reply to
Hi SandraR

Try these posts and let me know if you need further info.

http://www.gossamer-threads.com/...?post=274230;#274230

http://www.gossamer-threads.com/...nk%20display;#265852

For search results try
<%loop link_results_loop%>
<%if LinkType eq 'luna'%>
<%include link_luna.html%>
<%endif%>
<%endloop%>
<%loop link_results_loop%>
<%if LinkType eq 'luna2'%>
<%include link_luna2.html%>
<%endif%>
<%endloop%>

Not fancy but it works.

Regards

minesite

Last edited by:

minesite: Dec 21, 2005, 9:10 AM
Quote Reply
Re: [minesite] Multiple Template Sets In reply to
Thank you minesite for your reply,

I actually tried that option but set it to:

<%loop link_results_loop%>
<%if Category_Template eq 'luna'%>
<%include link_luna.html%>
<%endif%>
<%endloop%>
<%loop link_results_loop%>
<%if Category_Template eq 'graphics_default'%>
<%include link_graphics_default.html%>
<%endif%>
<%endloop%>


It did not work.

I notice you use <%if LinkType --- I am wanting an entire category set to the template type, if not I would have to change every link individually and when you reach well over 1000 links WELL you visit this forum in the hopes someone can help out.

If any one has run into this issue help would be greatly appreciated.


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Multiple Template Sets In reply to
Hi SandraR

You can do a dump in the search_results.html and see if the Category_Template shows up but I believe it will be all links based results, not category based results.
There may be a global to pull the category for that link if you want to go in that direction.

Thereís no need to edit your 1000 + links, you just need to add LinkType to the links table through the Admin>Links:Table Editor with the options of luna, graphics_default etc.

Then in your custom link templates, which you have already have I presume, add
<input type="hidden" name="LinkType" value="luna">
at the bottom somewhere.
Do the same with your other custom link templates and make the call in search_results.html template like mentioned in the earlier posts above.

You will also need to copy the custom links templates into the default local directory as well.

There may be an easier way with the new luna templates and themes but the above should only take 30 minutes or so.

Good luck and let me know the outcome.

Regards

minesite
Quote Reply
Re: [minesite] Multiple Template Sets In reply to
For now I took the lazy way out - at least until there is a better way.

<%if Short_Description%><%Short_Description%><%else%><%Description%><%endif%>

My detail pages already have the field Short_Description, the images I wanted to show in the search results page were using the Description field.

I then created search_results.html using the above tag to call it as <%include link_search.html%>

Ya its YUKY but at least it works now. Will try to spend more time finding a template resolve instead.


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Multiple Template Sets In reply to
In Reply To:
For now I took the lazy way out - at least until there is a better way.

Ya its YUKY but at least it works now. Will try to spend more time finding a template resolve instead.

Hi SandraR

Glad you have it working.

Youíve asked the same question over the last 10 days or on a couple of posts and received the same answer by way of using the
<input type="hidden" name="t" value="luna" />

Of course itís your prerogative to use it or not, but Iím curious why your reluctant to try it, does it not work for you or are the explanationsí not clear enough.?

Regards

minesite

Last edited by:

minesite: Dec 21, 2005, 6:16 PM
Quote Reply
Re: [minesite] Multiple Template Sets In reply to
Hello minesite,

Thank you for asking: the explanation was not clear enough.

I could not find the:
Admin>Links:Table Editor

Frustration and time constraints lead to the YUKKY way out. During the Xmas holiday I will have more time to try, test and ask more questions.


Agian thanks for asking :)


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Multiple Template Sets In reply to
Ok SandraR, when your ready, just post back here and I'll walk you through it step by step.

All the best for the festive season.

Regards

minesite
Quote Reply
Re: [minesite] Multiple Template Sets In reply to
Hello minesite,

My workload has dropped enough for me to learn some new tricks - if you still have time I would greatly appreciate a step-by-step lesson.

SandraR


Sandra Roussel
Chonsa Group Design - Fresh Start Housing