Welcome to WebmasterWorld Guest from 54.145.13.215

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Template Engines

Am I mad?

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

Full Member

10+ Year Member

joined:Mar 16, 2004
posts: 283
votes: 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

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

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Jan 16, 2007
posts:914
votes: 0


Smarty installation is completely painless on a shared server, just put it in a directory. I'm completely hooked on it.
7:00 am on Oct 17, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member dreamcatcher is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 30, 2003
posts:3719
votes: 0


Never cared for Smarty myself. I prefer Savant2.

dc

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

Full Member

10+ Year Member

joined:Mar 16, 2004
posts: 283
votes: 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

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

Senior Member from MY 

WebmasterWorld Senior Member vincevincevince is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 1, 2003
posts:4847
votes: 0


The one line template engine [webmasterworld.com] does the trick for me!
12:36 pm on Oct 17, 2007 (gmt 0)

Preferred Member

10+ Year Member

joined:Nov 2, 2002
posts:385
votes: 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?

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

Preferred Member

10+ Year Member

joined:May 12, 2004
posts:533
votes: 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.

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

Senior Member

WebmasterWorld Senior Member dreamcatcher is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 30, 2003
posts:3719
votes: 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

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

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Jan 16, 2007
posts:914
votes: 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 ;) ).