I cannot figure out what's up with this, not sure where to put this in the index file. How does this work? I thought that it should just redefine the value in the TEMPLATE variable.
Where does TEMPLATE get loaded then?
I've tried it before and after the existing code:
require(WB_PATH.'/templates/'.TEMPLATE.'/index.php');
I've tried putting it in an IF statement, copying the require, echo'd the results...
The other template is found in correct directory & displays if echoed, but nothing will change my existing template display.
Tried putting the existing "require" as an else to the template != and the page is empty - nothing but the body. I thought maybe the define was creating a constant, so I added it too...
At first I was putting it in the active template's index.php itself, which didn't work either.
Here's what I've put in the main wb/index.php file:
if ($_GET['template']!="") {
if(file_exists(WB_PATH.'/templates/'.$_GET['template'].'/index.php'))
{
define('TEMPLATE',$_GET['template']);
require(WB_PATH.'/templates/'.TEMPLATE.'/index.php');
}
}
require(WB_PATH.'/templates/'.TEMPLATE.'/index.php');