Joomler!.net - Decided on Joomla!

Jboard is Multiple Board!

Latest Posts

Doesn't change Template Selector value when change template by URL
Avatar euge001 2014/07/22 19:05
Have a good day to everyone! Do someone knows whether it's possible to show a current template...
Re:Template Selector 1.8.3 - Only works in Firefox
Avatar Lene 2014/07/01 16:23
Hello, It looks like that is working Thank you Kind regards Lene
Re:Template Selector works only on home page
Avatar Simon 2014/06/26 15:30
Thank You very much! TS is working like a charm!
Change template with Template Selector with PHP-script?
Avatar Rogbert Larsson 2013/08/12 14:51
I am using Template Selector for Joomla 1.5. Unfortunately I cant change template with Template S...
Custom Head Tag - no subforum no JED entry
Avatar Rex Kramer 2013/01/30 00:47
Hi, it was hard to find the custom head tag module. by the way, it has no sub-forum and it is not...

Popular Posts

Hello there how can I put Javascript and PHP on this forum? Solved
Avatar Jeroen Jansen 2012/04/12 04:07
Hello When I try to put javascript or php code on this site it gets broken. How do I help some o...
YOU TUBE BAR IE8 problem
Avatar denis gillier 2010/11/19 00:50
Hello, I installed youtube bar on my website, it's not working with IE8 (but Ok with firefox, ...
Template Selector change a template with a querystring?
Avatar Jeroen Jansen 2012/02/07 08:33
I need to Change the Plugin and it's Cookie handeling. Hello there, I used to work with templat...
Custom Head Tag - no subforum no JED entry
Avatar Rex Kramer 2013/01/30 00:47
Hi, it was hard to find the custom head tag module. by the way, it has no sub-forum and it is not...
Template Selector Customisation
Avatar Will Patterson 2011/10/25 17:52
Hi, Firstly thanks for such a great module as there doesn't seem to be anything else out there th...

Forum Stats

All times are UTC + 9 hours
Total Topics:261
Total Posts:1254

Forum Online

Total Online:42
Total Guest:42
Bottom
Home » Support » Modules » General » Template Selector - Force a template
Template Selector - Force a template
Template Selector - Force a template
Sunday, 01 April 2012 09:29
0 votes
Hi,first of all sorry for my english, but i'm italian smile.png
I've Template Selector installed and work very fine! smile.png
My question: In my website there're some pages that want displayed with a specific template, despite what the user select with the Template Selector.
There's a way to make this?
Thanks in advance
leonardo
Fresh Boarder
Fresh Boarder
4
2012/03/30
Last update:Sunday, 01 April 2012 09:30
Re:Template Selector - Force a template
Wednesday, 04 April 2012 05:24
0 votes
Hi,
no one have a suggestion?
Please smile.png
leonardo
Fresh Boarder
Fresh Boarder
4
2012/03/30
Re:Template Selector - Force a template
Wednesday, 11 April 2012 00:02
0 votes
Up, please! smile.png
leonardo
Fresh Boarder
Fresh Boarder
4
2012/03/30
Re:Template Selector - Force a template
Thursday, 12 April 2012 02:59
0 votes
Hello if you put this scipt in your templates index.php both of them.\
And you ajust the page names in your pages. and the template ID's of your templates.
Then this should work.
Here is the code! Javascript:
sorry I can not put the javascript on this forum.
It changes it....

<script>
/*The first part I just put in to let it work*/
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca;
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
function eraseCookie(name) {
createCookie(name,"",-1);
}

if(document.cookie.length <= 0){
alert("Cookies moeten aanstaan anders wordt de website niet correct weergeven."wink.png;
}

/*Here are the pages you want to display in a sertain template:*/
if(readCookie('welkom534') !== 'gegroet54')
{
if(document.URL.indexOf("page1.html"wink.png >= 0){
document.location += "?templatedirectory=7";
}
else if(document.URL.indexOf("page2.html"wink.png >= 0){
document.location += "?templatedirectory=7";
}
createCookie('welkom534','gegroet54',0)
}

/*on your other pages you erase this cookie:*/
if(document.URL.indexOf("page3.html"wink.png >= 0){
createCookie('welkom534','gegroet54',-1);
}
else if(document.URL.indexOf("page4.html"wink.png >= 0){
createCookie('welkom534','gegroet54',-1);
}

/*For your other pages reset the template to your bases template:*/
if(readCookie('welkom555') !== 'gegroet88')
{
if(document.URL.indexOf("page3.html"wink.png >= 0){
document.location += "?templatedirectory=8";
}
else if(document.URL.indexOf("page4.html"wink.png >= 0){
document.location += "?templatedirectory=8";
}
createCookie('welkom555','gegroet88',0)
}

/*Here are the pages you want to display in a sertain template: you erase the other cookie:*/
if(document.URL.indexOf("page1.html"wink.png >= 0){
createCookie('welkom555','gegroet88',-1);
}
else if(document.URL.indexOf("page2.html"wink.png >= 0){
createCookie('welkom555','gegroet88',-1);
}

</script>


Oke you can get the code from this you have to replace the smileys with a )
Jeroen Jansen
Fresh Boarder
Fresh Boarder
12
2012/02/07
Last update:Thursday, 12 April 2012 04:10
 
Home » Support » Modules » General » Template Selector - Force a template
joomler.net is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla!(R) name is used under a limited license from Open Source Matters in the United States and other countries.
joomler.net is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.