Skins: Flat or multiple includes

I’ve just started playing around with editing my skin, and noticed there are a TON of includes…



Is it in good form to have multiple includes? To me, having index.tpl include “head”, “footer” et al, lowers the speed to render. I’d like to have a more “flat” type of template without having to call other code/files that I feel should just be in index.tpl



Any thoughts?

I am sure there are tradeoffs between speed and flexibility for cart design and maintenance. However, remember that pages are cached so that overhead should be minimized. This is why it is important to empty the templates cache after making changes to assure that the templates are recompiled in the cache.



At least, that is my understanding of how it works.



Bob

MisterTC,



You’re probably not going to see much of a difference performance wise by dropping some of the includes. That being said, it’s usually best to leave a file on its own if you ever use it in more than one place. All general files (header, footers, nav, etc.) should be in separate files or you’re going to have a nightmare on your hands when you need to make changes down the road. The problem is that CS templates going a little crazy with included files and Smarty when much could be combined and managed through CSS. I general include files if I think it makes sense and helps me remember where the code is living…



B