Jump to content

barebones


Guest sgleaton

Recommended Posts

Guest sgleaton

I would like to know what the barebones items NEED to be used in working with the templates. IN other words, what do you HAVE to have to make a template work. I think with that knowledge I can actually create my own templates. Also, aren't there two, which one is the main or index page and the second template is the template used to house the detail of a catagory?? What about the cart itself and the detail of an item??

Scott Gleaton

Link to comment
Share on other sites

skin files:

styleImages - styleSheets - styleTemplates

styleImages

OK, everybody knows about using images, right?

styleSheets

This folder contains three stylesheets. Stylesheets are documents that apply stylings to HTML elements. Use these stylesheets to change the look of your site using styles. Styles "written in" CSS, wich is Cascading Style Sheet language. Styles are easy to learn. Pick up a good book, or find a web tutorial.

styleTemplates

These are your HTML documents. They are not your everyday HTML documents, but they are very similar. You have three folders here, boxes - content - global - popup

global

In this folder are the two main HTML templates: cart.tpl and index.tpl

Generally speaking, all the pages of your CubeCart™ site are actually variations of either the index or the cart global template. These two templates correspond to the store's root php files, index.php and cart.php. A change made in these two files
en tandem
will appear on every page throughout your site.

boxes

This folder contains many files, that correspond to the boxes that appear in your cart. The HTML in these templates is created by a corresponding php file in the includes/boxes directory, and it is fed into the global template by means of a variable (for example, {CATEGORIES} in global index.tpl represents the output of the categories.tpl file in this boxes folder of your skin). For more information, see "Manipulating Boxes in CubeCart™ 3" - at cubecart.org in the downloads section under Tutorials and Documentation.

content

This folder contains many files, responsible for putting information in the main content section of the global template. For instance, the file in here named index.tpl is responsible for putting the homepage message and the latest products onto the global index.tpl template. The file in here named viewProd.tpl is responsible for putting the product details you mentioned onto the global/index.tpl when you are viewing a product detail page. These files also correspond to the store's php files, example your skin's content/viewCat.tpl corresponds to includes/content/viewCat.inc.php

popup

The popup template is simply for showing the "More Images" popup

That's it in a nutshell. You can change everything about your stores appearance by altering the code in styleSheets and styleTemplates folders, and by changing or adding images into the images folder. Any changes made in those folders will affect only the look of the store, and only for that particualar skin.

Link to comment
Share on other sites

Guest sgleaton

okie thanks for that information, now for the final question. Can you, using a specific program that allows you to view what is going on, create your templates in say .html extension and then once completed change the extension to .tpl??

Link to comment
Share on other sites

I can create an HTML website template - then, I can use that template to make a global/index.tpl template and a global/cart.tpl template - then I can plug in the box templates by adding the variables (example, {SITE_DOCS}) into the global templates I've created. Then, I normally have to go into the box templates and the content templates to fine tune and format things to work just right in my spiffy global templates.

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