Screen: ShopSite > Merchandising > Custom Templates

Creating a Custom Page Template

A page template defines the layout and elements of a page in a store. You can use the same page template for all pages in your store, or choose different page templates for different pages. For example, a store's welcome page might use one template, product pages might use another template, and customer service or "about us" pages might use a third template.

To Create a Page Template:

If you are familiar with creating pages in HTML, creating a custom page template is quite easy. Basically, you create an HTML page, and then put in custom template tags where you want to use information from the ShopSite databases. You can even create the page entirely in HTML until you get the look that you want, and then go back and replace elements with custom template tags. If you already have an HTML page layout that you like, simply replace the hard-coded content with custom template tags.

1. Get Acquainted with ShopSite

If you do not have experience with ShopSite, you should become somewhat familiar with it before designing a page template. Spend time configuring and viewing the ShopSite demo stores from both the merchant and customer perspectives. You need to have a fairly solid understanding of what information is stored for pages and products, and how the built-in templates present that information.

2. Study the Examples

Look over the custom template specification to see the tags that are available. It will be one of your primary references while creating templates, or you can use the short version once you have the hang of it.

Study these example page templates and resulting HTML pages. Each example shows a different aspect of page templates. You can even copy any parts of these examples and paste them into your own template.

3. Create Your Template

Use an HTML authoring program or a text editor to create a page template.

4. Upload Your Template

Once you have your template complete (or at least ready for testing), you need to upload it into your store.

  1. From the ShopSite back office, click on Merchandising > Custom Templates.
  2. On the Custom Templates screen, click Upload Template in the Page Templates section.
  3. Use the Browse button to locate your template, then click Upload File to upload the template to your store.

You can also use FTP to upload the template to the correct directory. Keep these points in mind:

5. Test Your Template

You probably don’t want to test your template on pages from a live store. Create test pages that will test all of the layout and custom template tags that you put in your template.

  1. Add a test page to a store. When you are filling in the page information, scroll down to the Layout Info section and select your template from the list in the Page Template field.
  2.  

  3. Enter values for all the fields used by the template.
  4.  

  5. Publish the store and review the Publish Results page for any error messages.
  6.  

  7. Go to the store and view the page in a browser. Verify that all the page elements are there and that the layout looks the way you planned.
  8.  

  9. View the page using other browsers that customers might use, to make sure the page looks okay in all browsers.
  10.  

  11. Delete the values for some of the fields used by the template, then publish the store again and make sure the pages still look okay.
  12.  

  13. Check the HTML of the page by running it through an HTML validator, such as http://www.htmlhelp.com/tools/validator or http://validator.w3.org.
  14.  

  15. View the source of the page. If the ShopSite parser did not recognize a tag, or if a database field was empty, it replaced the custom template tag with an HTML comment tag containing information about the problem, like this:
  16. <!-- VAR ASPARAGUS IS NOT DEFINED -->

Make any necessary changes and test the template again, then tell the merchant that it is available. The merchant should be able to select the template from the Add a Page screen (advanced editing version) or the Edit Page Layout screen.


ShopSite Help and Resource Center
February 13, 2004
Give Feedback

© 2007, ShopSite, Inc.
ShopSite Shopping Cart Software