View Single Post
Old 10-07-2008, 07:11 AM
balinor balinor is offline

Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253

Default Re: Template Editing Guide

General template editing notes

- Most of the text in X-Cart (such as the welcome text, error messages, titles of pages, button labels, etc) are controlled with Language Variables. The manual covers this fairly well. You can edit these variables in Webmaster Mode (by clicking on the green text) or by clicking on Languages in your admin menu.

- When adding new content or formatting existing content, try to keep all of the formatting in the CSS file. For example, instead of this:

<td bgcolor=blue> (the old way of doing it)
use this:
<td class="test">

and add .test {background-color: blue;} to your CSS file. Keeping the formatting in the CSS file decreases your page load time, and using the most current code keeps your pages displaying correctly in all browsers. (note: change 'test' to a class name that will be informative so you can keep track of them easily)

- When calling images, be sure to use Smarty. Upload all of your graphic images (not the product images, they go elsewhere) into the skin1/images directory and call them using this format: <img src="{$ImagesDir}/imagename.jpg" alt="Alt text here" />

That keeps them from causing security warnings when the page is in secure mode.

- To 'comment out' a line of code (if you don't want it to display, but might need it later), use this format:

{* commented out code *}

- You can edit templates in X-Cart itself, via FTP or in a text editor. Don't edit them via FrontPage or Cpanel, as extra code may get inserted that will screw up your layout

- There is always a copy of the original template in skin1_original, although I recommend making incremental backups so you don't lose EVERYTHING you have been working on.

One more thing - it is tough to work on X-Cart without the proper tools. You should be using Firefox with these extensions:

- Firebug
- Colorzilla
- MeasureIt
- Web Developer Toolbar

Hope this answers some of your questions. Enjoy!
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development