Gossamer Forum
Quote Reply
different template
Hi

Is there an easy instructions to simply modify LinksSQL 2 to use a different template for each category???

Regards

Antoine
Quote Reply
Re: [antoined] different template In reply to
make a new template (ex. newtemplate) set and use enter the name of the set in the category you want - simply enter newtemplate and that category will use the templates from the newtemplate set

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] different template In reply to
Thank you Klaus. for this, I got it.

- One other question please: <%include include_form.html%> will be tha same for all cotegories? or it could be different for each new set of new templates created?

Let me know please

Thanks again

Antoine
Quote Reply
Re: [antoined] different template In reply to
Default it is the same for all categories as far as I know - but you can try to make a new include_form.html in the new template set - if it does not work you should be able to use it by adding &t=newtemplatename in the url

Cheers
Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] different template In reply to
Very helpful thanks again,

But unfortunately /add.cgi is keeping calling the default include_form.html (unless you call the new one, as you said, by adding &t=newtemplatename in the url), even if making a new include_form.html in the set of the newtemplate.

I a wondering if we can say something like to /add.cgi:

if a specific category <%include include_form.html%> else <%include include_form_1.html%>

Any hint?

thanks

Antoine

Quote Reply
Re: [antoined] different template In reply to
Yes I think you should be able to do that - try:

<%GT::Template::dump%> to see what info is available on the template... I think it is ID that is the category - if that is the case then..

<%if ID eq 'XX'%><%include include_form.html%><%else%><%include include_form1.html%><%endif%>

If you are working on a live site then login and use the below so you don't reveal the codes to others

Code:

<%if Username eq 'your user name'>
<%GT::Template::dump%>
<%endif%>

http://www.ameinfo.com