PDA

View Full Version : template system



VistaBoy
27-07-2008, 02:31 AM
Okay i have been trying to make a template system that works for well over 3 month and i can not get it to do what i want so i want to know if any one knows of any tuts and can post a tut here for me.

what i am trying to do is make it so you can call them template blah.tpl like
echo eval( $template->load('blah')); or some thing and in the blah.tpl i can have {$lang_hello} and that will be the word lang from my lang.php file $lang = array blah blah.. and also have {$str_login_open} that that would be like if($user >= 1) { and have {$str_close} as }

some thing along them lines so can some one help me..

thank you ;)

Moved by Invent (Forum Moderator) from Designing & Development: Please post in the correct forum next time, thanks :).

Calon
27-07-2008, 12:46 PM
Okay i have been trying to make a template system that works for well over 3 month and i can not get it to do what i want so i want to know if any one knows of any tuts and can post a tut here for me.

what i am trying to do is make it so you can call them template blah.tpl like
echo eval( $template->load('blah')); or some thing and in the blah.tpl i can have {$lang_hello} and that will be the word lang from my lang.php file $lang = array blah blah.. and also have {$str_login_open} that that would be like if($user >= 1) { and have {$str_close} as }

some thing along them lines so can some one help me..

thank you ;)
Take a look at the source of SMARTY templating system so you can get a rough outline on how they've done it, don't rip their system though.

Source
27-07-2008, 02:12 PM
Just use smarty....

Excellent1
27-07-2008, 02:18 PM
As people have said smarty is really good for templates.

Dentafrice
27-07-2008, 08:09 PM
Take a look at the source of SMARTY templating system so you can get a rough outline on how they've done it, don't rip their system though.
How could he rip it? It is open source :P

Excellent1
27-07-2008, 09:38 PM
How could he rip it? It is open source :PHe thinks everything open source is ripped.

Fehm
30-07-2008, 03:14 PM
lol
everything open source is ripped

true ^^

and id use smarty :P

Want to hide these adverts? Register an account for free!