View Full Version : Template Management System

Todd W
12-13-2006, 11:50 PM
Ok, so it's come to that time where I need to change the design for a site I did 2 or so years ago and have kept adding onto since then. It's a 100% custom CMS that does not currently use a template system :( Sooo, in order for me to change the design I hae to MANUALLY *gasp* edit every page. Soo... instead of just changing to a new design I'd like to integrate a new template system so if I have any need to change designs again I can do so very easiy.

Where should I start looking/reading/learning?

The site isn't 100% "dumb" the navigation, left and right systems, etc are template driven but the "main core" of the design is not.... So point me in the right direction *php*.


12-14-2006, 04:48 AM
ToddW - remember this recommendation comes from a designer, it may be absolute rubbish :)

But I am really impressed with the Smarty template system (http://smarty.php.net/). I was amazed at how much detail you could include, exclude on database calls - and also how easy it was to pick up for a totally non-programmer like me. I've used it on x-cart.

But like I say - this is a novices recommendation I know nothing about how it effects the server or page speed

Todd W
12-14-2006, 02:20 PM
Thanks, I'm not sure if that will work how I would like it too.
The Smarty looks very advanced/nice but I think I just want something a little more simple...

I think I might just make a template file, include it on each page, and then in the middle of that include the "code" through a variable.

So my idea would be to use .htaccess and re-direct *.html to index.php?page=whatever

And then I would include the index.tpl ont he page and inside that $code variable would be "whatever" page it's on the code. This way I can do the entire page/navigation dynamically and the only thing determining the contents is what page it's on.

I'm going to try to come up wiht a possibly better way that would allow for more changes, possibly determing navigation/ads based on the page (optioanl) too.

Maybe I can do this with the smarty class and more.