Jump to content

Difference between Skins and Templates


oneplace

Recommended Posts

1. A 'skin' or 'theme' is the outward appearance and placement of controls and images. If using the Firefox browser, you have the opportunity to affix to it any of dozens of stylings that paint and position the colors and placement of things. The operation of the browser, it's features and functions, do not change in any way.

A 'template' is the idea of a set of containers, aka placeholders, that a template rendering engine will put into these containers what is given to the engine. In programming, ideally, the name of the container gives a good idea of what is expected to be contained. A bowl with the identity of "sugar" gives an idea of what will be in it, such as cubes, powder, crystal, brown, and either a lot or a little sugar, but there is absolutely no requirement that such named container actually contain sugar. However, it will be confusing to the viewer.

2. Now that you know that templates have placeholders, asking the web server to send you an unprocessed template will give you some idea of what the template looks like*. Instead of seeing sugar on the page, you will see the identity of the placeholder, such as {$put_sugar_material_in_here}.

Link to comment
Share on other sites

In CubeCart's case, we can name the template we want the data to appear in. For no specific reason I can think of, the decision was made to suffix the template file names with .php. But they are not files of PHP code. They are, in fact, HTML document and document sections -- with placeholders. The complete set of templates define a theme.

Even though each theme/skin uses the same placeholders and is filled with the same data, where that data appears (top, left, middle, big, red, etc) is from the design considerations of each skin.

I think you will come to see how it all comes together shortly -- perhaps you just need to think sideways.

Link to comment
Share on other sites

  • 8 months later...
On 9/22/2015 at 10:10 PM, bsmither said:

In CubeCart's case, we can name the template we want the data to appear in. For no specific reason I can think of, the decision was made to suffix the template file names with .php. But they are not files of PHP code. They are, in fact, HTML document and document sections -- with placeholders. The complete set of templates define a theme.

Even though each theme/skin uses the same placeholders and is filled with the same data, where that data appears (top, left, middle, big, red, etc) is from the design considerations of each skin.

I think you will come to see how it all comes together shortly -- perhaps you just need to think sideways.

If I want to learn how to modify the skin and template of cubecart v6-11 is there some doc or instruction showing where and what everything in the the skin and template is and what it does. I am not a programmer as such, I learn as i go and do. Thank you

Link to comment
Share on other sites

There is this (also applies to CC6 but may not be complete):
http://www.cubecartforums.org/docs/CubeCart-v5/customising-cubecart/smarty-skin-breakdown.html

There is this (Smarty: the template rendering engine):
http://www.smarty.net/docs/en/

There is this (Foundation: how the HTML/CSS/JS of this 'responsive' skin behaves):
http://foundation.zurb.com/sites/docs/v/5.5.3/

Finally, there are these forums where any question can be asked without judgement or quibble (unlike StackOverflow).

Link to comment
Share on other sites

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.   Paste as plain text instead

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