Joomler!.net - Decided on Joomla!

Wiki or Wordpress? No it is JContentPlus.

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

Editor Switcher does not work
Avatar Anders H 2015/06/19 18:37
Hi! The "Editor Switcher" does not work in my Jommla version 3.4.1. Best regards ...
Editor Switcher fights with CKeditor
Avatar Don Moldover 2011/03/11 09:47
I have been using Editor Switcher successfully for quite some time on a number of different Jooml...
Can't Download Editor Switch
Avatar Joshua 2009/10/12 07:30
When ever I open this page: http://www.joomler.net/download/81-joomla15-plugin/699-editor-switch...
jooma 2.5 editor switch doesnt work
Avatar stix 2012/05/26 15:22
it load empty page for article. already set super access - editor switcher. and publish plugin...
Editor Switcher for J.16
Avatar Josh 2011/09/03 08:25
It would be cool to see Editor Switcher for joomla 1.6!

Forum Stats

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

Forum Online

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