Jump to content

Recommended Posts

Google: php template engine

Result: http://www.smarty.net/

 

You can also create your own template-engine by using str_replace, or if you want to do some advanced stuff: preg_replace and preg_replace_callback

 

Think about caching (by saving your template and content in an extra file)

 

And include is not a good way to do so.

If he is just wanting to put the design of the site into a single place so that changes reflect over every page include would work just fine.

 

Thanks for your comments.  I am already using includes with a template-page.php file, and I save the file in a different name each time I need to make a new content page.  However, if I then make a change to template-page.php, I then need to go back and update all the other pages.  I need it so that if I change the template, all the pages based on the template are automatically updated. 

 

Any more comments anyone?

 

Thanks

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.