Categories > Your tips & tricks >

Code'ifying LoadTemplate()

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: TomH
Date: 2006-01-25
Time: 15:05

Code'ifying LoadTemplate()

to make coding-life a little simpler I keep a set of 'default TBS .php and .html files in my code editing program. Part of the simplificagtion is automagically filling in the file basename of the php script into LoadTemplate().
Try:
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;
HTH