homepage Welcome to WebmasterWorld Guest from 54.211.95.201
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Template Engines
Am I mad?
PeteM




msg:3479228
 9:06 pm on Oct 16, 2007 (gmt 0)

I've never got round to installing Smarty templates (the install looks too painful on a shared server). However I really like using templates (it makes the dev process so much quicker). So instead of Smarty I use a slightly modified version of the phpBB template engine (even for my non phpBB sites). Am I mad? Does anyone use any other template engines (apart from Smarty)?

Pete

 

cameraman




msg:3479532
 6:19 am on Oct 17, 2007 (gmt 0)

Smarty installation is completely painless on a shared server, just put it in a directory. I'm completely hooked on it.

dreamcatcher




msg:3479558
 7:00 am on Oct 17, 2007 (gmt 0)

Never cared for Smarty myself. I prefer Savant2.

dc

PeteM




msg:3479691
 11:48 am on Oct 17, 2007 (gmt 0)

Just had a look at Savant2. Looks like a lot of php code embedded within the template. Surely that defeats the object?

Cheers, Pete

vincevincevince




msg:3479695
 11:52 am on Oct 17, 2007 (gmt 0)

The one line template engine [webmasterworld.com] does the trick for me!

lasko




msg:3479720
 12:36 pm on Oct 17, 2007 (gmt 0)

Smarty is still I feel is far better for already built in functions.

It can look a bit scary for a beginner who's never studied the concept of template engines but once you get your head around it then its simple.

Install is very easy just follow the basic installation [smarty.php.net...] to ensure it works then slowely make adjustments to suit your own app.

I have a dir for my main ap say

/dir

then I have php classes

/dir/class

then I have the smarty template at

/dir/class/Smarty

With smarty you can prevent php code being inserted by designers and force them to use smarty functions only which are very easy to use like looping, dates etc.

Tried writing my own and it worked but then found smarty which was faster, why have a dog and bark yourself?

hughie




msg:3479815
 2:45 pm on Oct 17, 2007 (gmt 0)

"Tried writing my own and it worked but then found smarty which was faster"

me to, although writing my own really helped when picking up smarty as the concepts are the same, smarty just makes it sooo much easier.

Back the question, smarty is very easy to install on a shared server, you just have to whack it in a directory and you're away.

dreamcatcher




msg:3479997
 5:41 pm on Oct 17, 2007 (gmt 0)

Just had a look at Savant2. Looks like a lot of php code embedded within the template. Surely that defeats the object?

Its very versatile and easy to implement. Each to his own.

dc

cameraman




msg:3480122
 7:26 pm on Oct 17, 2007 (gmt 0)

I don't think this is off-topic since the OP is asking about template engines, but dc, why do you prefer savant2? Smarty is my first foray into template engines and I just love it, but I don't have any experience with any other (and I'm rarely opposed to upgrading ;) ).

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved