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

Help installing
Avatar Nicholas 2009/10/13 03:52
Hello I have a Joomla 1.5.14 site. I have created a test page with 3 pictures. Two are just pi...
Important Question
Avatar Luiz 2009/07/27 06:24
I have a page with photo gallery, that I want to be showed wth greybox (This part works well) and...
English how to
Avatar lipex666 2008/01/01 09:15
Hello Can we please have some English support as babblefish does not work that well. 1. How...
Menu buttons and Gray Box
Avatar Vladi 2009/10/17 07:43
Hi! One of my menu buttons points to external web page of my Joomla 5.14 site. How can I make...
各記事の最後に 1 が付け足される
Avatar gondayu 2007/11/25 20:25
Joomler! さん、こんにちは。 現時点で、Joomla! 1.5 RC3 rev 9436 を利用しています。 Joomler_GreyBox_1.0.0_for_Joomla...

Forum Stats

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

Forum Online

Total Online:47
Total Guest:47
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.