Hi Felipe,
When a TBs tag with parameter 'file' is merged, then the tag is immedialty replaced by content of the file. Then the main template become main+sub.
If such a TBS file is named 'onload', then the sub template is inserted at the end of the LoadTemplate() method.
But, if what you want to do is to simply change change the main template, you can just re-use LoadTemplate() with another file name, and old template will be replaced by the new one.
Don't forget that LoadTemplate() can also add a secondary template to the current one without erasing. This can be done using a option.
For your problem, mabybe something like this can help:
if ($_GET['x']=='1') $template = 'file1.htm';
if ($_GET['x']=='2') $template = 'file2.htm';
if ($_GET['x']=='3') $template = 'file3.htm';
$TBS->LoadTemplate($template); |
I hope this help.