Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Skins: Flat or multiple includes Rate Topic   - - - - -

 
  • MisterTC
  • Junior Member
  • Members
  • Join Date: 01-Oct 07
  • 21 posts

Posted 18 November 2007 - 09:51 PM #1

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?
__________________
Huh? Who? Me? Nawwwww.......

 
  • jobosales
  • Senior Member
  • Members
  • Join Date: 04-Nov 06
  • 3114 posts

Posted 18 November 2007 - 10:00 PM #2

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
CS-Cart 2.0.14 (testing)

 
  • bholland
  • Senior Member
  • Members
  • Join Date: 16-May 06
  • 129 posts

Posted 18 November 2007 - 10:54 PM #3

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
CS Cart 1.3.5 SP1