The content of a site is represented as a collection of objects. For example, each item or section is an object. An object has an id, a type, a template, and zero or more properties.
The properties an object has depend on what type of object it is. An object representing an item for sale, for example, would probably have at least a name, an item number, a price, and a description.
Ordinarily, each object corresponds to one Web page. The object's template defines what that page will look like. Store has a set of predefined templates, but you can easily define new templates of your own.
A template is a series of RTML expressions. An expression is either simple, e.g.
1
or complex. A complex expression consists of an operator, and zero or more arguments, which are themselves expressions. For example:
TEXT 1
The preceding expression consists of a TEXT operator and a single, simple argument, the number 1. Its effect is to print 1 on the page being generated.
When a template is used to generate a page for an object, the expressions in the template are evaluated in order. When an expression is evaluated, it always returns a value, and may also have side-effects like generating output.
Whenever a template is used, there is a current object and a current page. The current object is the object whose page is being generated. If the template refers to properties, they default to the properties of that object. The current page is the page being generated. If the template generates output, it becomes part of that page.
See Also: