How Templates Work

⚠️ The annual cost of maintaining the server where this website is hosted, the domain, and keeping it up-to-date is approximately €3,000 per year. Help us with a small donation to cover these expenses. Support Now!

0 / 10000

Templates convert the result of business processes (for example, product details) into a response that can be returned to the client (for example, a list of product specifications and an image).

  1. The first time a template is requested it's converted into an internal structure for processing.
  2. The Template Processor processes the ISML tags and expressions and parses any attributes and values stored in the Pipeline Dictionary.
  3. The resulting data is added to the output stream and pure, static HTML pages are sent to the browser.

Templates are always triggered by a pipeline. They implement the presentation logic (web design). You can cache execution results as an HTML file (page caching).

Template Files

Templates contain:

  • Browser-ready content of web pages
  • Special markup tags for handling variables that are looked up in the Pipeline Dictionary on demand for dynamic content
  • Other instructional markup tags for processing and information flow
  • Style information for formatting the requested page

Templates are stored as *.isml files that consist mainly of HTML and ISML code. They are located in a locale-specific folder under the /cartridge/templates/ folder, with /cartridge/templates/default being the default locale. Each local-specific folder can contain for subdirectories organized around areas of functionality. If you support multiple locales, each locale must have a separate subdirectory under /templates/. All templates must be in a subdirectory of the templates directory, either the default directory or a locale directory, and can't be stored in the templates directory itself.

Note: Each cartridge has its own templates directory.

Templates used to show information in the storefront are represented by an interaction node in a pipeline. Information about them also appears in the Properties view. If you want to modify how information is presented in a storefront, you should edit a template or create a new one.

Before Editing/Creating a Template

Before you edit a template, you must define the layout/design of a web page. You must also identify information about the pipeline that uses your template and the data to appear by the template. After you collect this information, modify the template using UX Studio.

Pipeline Information

This is the information you need about the pipeline that calls a template:

  • The name of the pipeline that calls the template
  • The name of the template you are modifying
  • The name of the template variables you need to show the data in a template

Data Information

The interaction between the storefront and the buyer is defined by input and output data delivered by a pipeline.

Input data Output data
  • Order information
  • Shipping information
  • UPS built-in gateway integration
  • Payment information
  • Built-in gateway integration for: Cybersource, Paypal, Verisign, BillMeLater
  • Tax information
  • Gift certificates
  • Catalog data
  • Inventory
  • Pricing
  • Promotions, coupons, source codes
  • Customer profile management
  • Customer address book
  • Payment preferences
  • Order status

Templates either deliver input data or show a pipeline's output data on the browser.