By: Mankiy
Date: 2003-06-28
Time: 02:11
|
compiled Templates
You ever thought of using compiling to make TBS faster???
I've seen it in template engines such as SmartTemplate and Smarty, and im thinking it would make this Template Engine a heck of a lot faster.......
Also....
Template Directories.
What lines would i have to edit to add that into TBS? I dont want to have to put the LoadTemplate("templates/index.tpl"); everytime. I want the users im distributing my stuff to to be able to change it, ty for the help....
|
By: Skrol29
Date: 2003-06-28
Time: 12:16
|
Re: compiled Templates
Hello Mankiy,
The Smarty template compilation means that Smarty cook a script wich enables to run the template with one file and without smarty (I'm not sure without Smarty).
This is possible because Smarty templates can contains sort of for-next and do-while instructions. But TBS doesn't.
Smarty has 38 methods and 34 properties.
TBS has 7 method and 2 properties and does quite the same.
Make a TBS compilator would be a big job. Big but possible.
A template directory could be a good idea but isn't it the same as global variable ?
$tpldir = 'templates\' ;
...
$TBS->LoadTemplate($tpldir.'index.tpl') ;
|
By: Mankiy
Date: 2003-06-28
Time: 18:21
|
Re: compiled Templates
yeh, but it gets kinda annoying if you do that, and i want the people in distributing stuff to to be able to change the Templates directory without having to change tons of files....
|
By: Skrol29
Date: 2003-06-28
Time: 18:47
|
Re: compiled Templates
Less smart ok, but why annoying and why change tons of files ?
You code your application with all LoadTemplate($tpldir.xxx) and let the global var $tbldir to installers.
You can also feed $tbldir with a string in a conf file.
|
By: Mankiy
Date: 2003-06-28
Time: 19:46
|
Re: compiled Templates
o, lol, i get what ur saying now :)
lol, ty
|
By: Mankiy
Date: 2003-06-30
Time: 18:31
|
Re: compiled Templates
also, another thing about COmpliing the Templates, thats the only thing thats really keeping Smarty and SmartTemplate ahead of most everyone.....
and i would think it would make this Engine possibly the fastest made if u were to do that 0_o
I mean, its already gfaster then Smarty and SmartTemplate, and you could jump in the lead maybe if you did that..
|
|
Posting in progress.
Please wait...
|