Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Switch between two sets of templates

Quote Reply
Switch between two sets of templates
I want to switch between two sets of templates
cgibin/links/templates and cgibin/links/templates2
I figured via a global how to set a flag and check for it, so I want to completely switch to the new set of templates if the flag is set from any page.

Thanks in advance...
Mark
Quote Reply
Re: [Mark2] Switch between two sets of templates In reply to
I thought you already have a working solution here:
http://www.gossamer-threads.com/...i?post=288598#288598

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Switch between two sets of templates In reply to
No, actually, to switch between the two sets of templates was simple, I found a thread that talks about it.
You just need to put: t=templates1 or t=templates2 in the URL since the t is already preserved.

However, the global that you have provided me works also very nicely if you want to switch between languages defined in the same template set.
Actually, I am using it in the headers to show the word: "English" to switch to English templates (templates1), then show "Russian" to switch back to Russian language.

The only think that is not yet resolved is figuring out how to call the current page (on the same set or on the other set of templates) from every page???

Thanks much for your help...
Mark
Quote Reply
Re: [Mark2] Switch between two sets of templates In reply to
Quote:
call the current page (on the same set or on the other set of templates) from every page???

Not really clear.
Could you show me an example?

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Switch between two sets of templates In reply to
I do not have things live yet. They are in the enternal testing environment, but what I am trying to know is also listed on this thread: http://www.gossamer-threads.com/...;;page=unread#unread

Baiscally, I have to sets of templates (templates1 and templates2)...
Say you are in "cars >> Mercedes-Binz >> Steering Wheels" category and u are in .....&t=templates1 (in the url), and now you want to switch the language of this page (Steering Wheels) to Russian, so you click on the word "Russian" in the header (using your global), and now the url leads to .....t=templates2 (that is in russian)... but I want, when I click the Russian, to be directed to the same category (Steering Wheels) but in russian language..

The English & Russian words that load different sets of templates are exist on all pages, so the user transfering will be seemlessly and he would not notice anything excpt that the language becomes a different one..

thank you again and regards...
Mark
Quote Reply
Re: [Mark2] Switch between two sets of templates In reply to
Use this template code:
Code:
<%if language('Russian')%>
<a href="<%db_cgi_url%>/page.cgi?d=1&g=Computers/Accessories/index.html&t=mytemplate&lang=Russian">Russian</a>
<%else%>
<a href="<%db_cgi_url%>/page.cgi?d=1&g=Computers/Accessories/index.html&t=mytemplate&lang=English">English</a>
<%endif%>

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Switch between two sets of templates In reply to
that is what I am using now, but my question is to preserve the location if the customer clicks on english or russian from any page.?
thanks
Again..
Quote Reply
Re: [Mark2] Switch between two sets of templates In reply to
In admin setup there is a presence option where you can input those parameters you want to preserve.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Switch between two sets of templates In reply to
Sorry if I was not so clear before.
what I am looking for is a link to call the same page that you are on.
say you are in a New or Review or Certain category and you click the link from that page, and it will just refresh the same page... that is all.. means
I want to put a link on all pages and when this link is clicked the link will call the same page...
e.g. if I am in Review and clicked xxxx then I will stay in Review.... (reload the same page).

thanks again
Mark