Forum Moderators: coopster

Message Too Old, No Replies

How to manage templates in most effective way

         

impact

1:36 am on Nov 19, 2011 (gmt 0)

10+ Year Member



Hello,

I am trying to create multiple templates in my site so that user can choose different look and feel depending up on their personal preferences but the problem is, in my script there are too many "include_once". I am wondering if this is going to effect the performance in any way. Here are the steps to my templates..

1. the index file load (include_once) template file after fetching template preference data from database.

2. The template file load (include_once) a class file which then fetches all data from database and sends back to template file.

Is there any better way to do this?

Thanks

Habtom

8:30 pm on Nov 19, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This sounds fine. Unless you are storing images inside the database or that sort of thing, it should be alright.

You can optimize your queries one by one, but generally the approach you mentioned sounds alright.

penders

11:24 pm on Nov 19, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



...but the problem is, in my script there are too many "include_once".


How many is "too many"?