![]() |
Template Phraser
What is the best method for outputting templates. At the moment I have:
Template Class: PHP Code:
PHP Code:
HTML Code:
{welcome_message}That all works, but i need something a bit more advanced, where i can do things like: HTML Code:
{if $core->user->isRegistered()}Thanks in advance. |
php Code:
|
Going back to the thread you replyed in before about application wide objects etc.
This means i have to do $core = core::init(); at the top of each view file which, sorry to say is not going to happen as its terrible and looks horrible also. |
I don't remember creating an
init() function in that other thread. |
I posted what im using. Kalle's class.
|
Why make your own template parser when there are lots of open source Classes already made? I use H2O: http://github.com/speedmax/h2o-php/tree/master
|
Quote:
I would use it but its to extensive. I need something that is tiny and possibly one one file. |
Sorry for the double post but id just like to say I'm going to use Wildhoney's method and use the following function:
PHP Code:
|
| All times are GMT. The time now is 11:27 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0