Jump to content

How to go about a Basic templating system


AbydosGater

Recommended Posts

Hi,

I have had an idea for an update to my site but it would need a templating system.

I was wondering if going about making a templating system like this would work...

 

---------------

The index file runs when a browser is pointed at it.

It runs all the functions for say the menu bar and the code for creating it and all the other stuff..

When all the menus and page information is saved in variables the index.php calls in index.tpl which just has lots of html and a few blocks of php to echo the variables with the html code and there we have a page being displayed.

 

Now it will not be like the example above just the one page but there will be other files that display different information from the database and i was just wondering if doing it this way was a good idea?

 

Any other ideas or comments all accepted!!

Thanks for your time in reading,

Andy.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.