Screen: ShopSite > Merchandising > Custom Templates
Custom template include files are an easy and convenient way to modularize your custom template code. You simply save a piece of code -- from one line to as much as you want -- as a separate file, then use an [-- INCLUDE filename --] tag where you want to place that code in your template. You can use include files for several purposes:
A custom template include file can be any chunk of code that you want, small or large. You can create your own, or use any of the built-in ShopSite include files.
It’s usually easier to create include files after you’ve planned a custom template, and possibly after you’ve created most of the code. Once a template is planned, you can identify sections where it would make sense to use an include file, such as:
The example shows how to use an include file for a Cascading Style Sheet that is going to be applied to many pages. It also lists all of the built-in ShopSite include files and information that you need to know to use them.
Using include files is a two-part process. You must create the include files themselves, and put [-- INCLUDE filename --] tags in your templates where you want to place the contents of the include files.
If you want to create an include file from a piece of your existing code, simply copy the code and paste it into a new include file. Then replace the code in your template with an [-- INCLUDE filename --] tag.
Once you have your templates and include files complete (or at least ready for testing), you need to upload them to your store. To upload include files:
You can also use FTP to upload include files to the correct directory. Keep these points in mind:
Since an include file is not a stand-alone piece of code, you test an include file by testing the template that references it. Follow the test procedure for the appropriate template type.
ShopSite Help and Resource Center Give Feedback |
ShopSite Shopping Cart Software |