Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » Chameleon / ChameleonLite
- » ChameleonLite
- » Template switching problem
Template switching problem
Template switching problem
I used this code and it worked
if ($language_code == "es") return "beez";
if ($language_code == "en") return "wideheaderblankbottonmarzo2011-2";
But I have two languages so far maybe more next year and four templates english en-gb front page template and spanish es-es front page template and an english template for everthing else when joomla front end language is en-g and a spanish template for everything else when language is es-es I am using joomfish to select language on front page and community builder for registration joomla 1.5.22 and joomla built in sef urls if that matters? I want 4 templates like I said the code your recommended in the forums below that I modified doesn't work? I was going to use it and then continue on with another rule to specify the others.
if ($content_genius->check("pagetype = frontpage")) {
if ($language_code == "es") return "beez";
if ($language_code == "en") return "wideheaderblankbottonmarzo2011-2";
// add more as appropriate...
}
Re: Template switching problem
Although it's not completely clear what you're asking for, I'm going to make a guess and hope that I get it right!
The following PHP will return 1 of 4 templates depending on:
1 - front page, and english
2 - front page, and spanish
3 - all other pages, english
4 - all other pages, spanish
The PHP:
if ($content_genius->check("pagetype = frontpage")) {
if ($language_code == "en") return "wideheaderblankbottonmarzo2011-2";
if ($language_code == "es") return "beez";
}
if ($language_code == "en") return "rest-of-site-english-template";
if ($language_code == "es") return "rest-of-site-spanish-template";
Hope that's what you're after,
Stephen
- Index
- » Chameleon / ChameleonLite
- » ChameleonLite
- » Template switching problem
Board Info
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked