[devtalk] Straw poll - templating
David Precious
davidp at preshweb.co.uk
Thu Mar 19 22:21:40 GMT 2009
Matthew Macdonald-Wallace wrote:
> I'm working on the development of a content and document management
> system and I need a bit of advice on how to structure the templating
> system.
>
> At the moment, there is a file called page.class.php and within this
> class is a function that holds the xHTML for the site template. This
> is less than ideal so I'm thinking about moving to a more suitable
> template format.
It sounds almost as though you're trying to write your own templating
system?
If that's the case, I'd strongly suggest that it's a wheel that doesn't
need re-inventing.
Have a look at Smarty, which should take care of templating for you.
(Personally I'm a Perl man and I use Template::Toolkit (or
HTML::Template at work), but if I had to do something in PHP, I'd look
to Smarty first for templating.
Cheers
David P
More information about the devtalk
mailing list