To create a custom template for your site it's recommended that you downloading one of the templates ( Blue_Left_Bar.htm ) that are in place to see how the bits all work together. You can find the templates in the /template folder and access them via FTP or cpanel's File Manager.
Then --
1. Create a regular HTML file with the extension of .htm. ( NO NOT NAME IT INDEX.HTM ) Add the system include codes within the HTML code, with a PHP path:
<script language="php">include(SB_HOME_PATH ."/" .SB_INC_DIR ."/somefile.php");</script>
Where "somefile.php" is a file within the "enc" (or includes) directory, as shown in gray next to the site include name on the site codes page.
2. Follow the instructions below when creating the template:
- Do NOT use the %CODE% value - instead, use the PHP path listed above.
- You must include the whole PHP path if multiple pages are to be used.
- The template file should be named with the template`s name with any spaces noted with underscores. For example, if you wish to call your template "Blue Moon", name it "Blue_Moon.htm". Template files must end in .htm
- Do NOT name it index.htm
- Click here for a list of the required includes
- Include absolute image paths (ie. http://yoursite.com/images/picture.gif) instead of relative ones (ie. images/picture.gif) in the template.
- If you are a template designer creating templates that will be used on multiple sites you will need to use the PHP path to images within a template instead of the domain absolute path
Example:
Instead of -
<img src="http://yoursite.com/images/picture.gif" border="0">
use:
<img src="<?php echo "$urldir/images/yourimage.gif"; ?>" alt="-" border="0" width="theimagewidth" height="theimageheight">
- Images should NOT be stored in the "template" directory
- Upload the custom template to the /template folder via FTP or File Manager ( cpanel ) - DO NOT paste it in the custom template window in storeadmin
3. For each .htm template file you create, you need to create a matching .php file that shows all color values. This will serve as a file that allows the shop to update the link and button colors as they select a new template.
The .php file should be named exactly as the corresponding .htm template file, except for the extension. Again, download an existing template .php file ( Blue_Left_Bar.php ) to use as a guide. For each value, replace only the color value within quotes.
HINT 1: To reuse templates on multiple sites, be sure to use a variable path for images. In other words, instead of referencing them as "images/picture.gif" or "http://www.mysite.com/images/picture.gif", use:
<img src="<?php echo "$urldir/images/yourimage.gif"; ?>" alt="-" border="0" width="theimagewidth" height="theimageheight">