Home | Index

r3 User Guide

Templates

Template files have an .ros extension. They are specialized to "container level" (generic to the intl). The default template name is taken from the target name. For example, the following command creats the target blah.html in cheese/us/blah.html:

r3 target create cheese/us/blah.html

The template name is blah.html.ros, and the search path for template and translation is (1) cheese/us/blah.html, then (2) cheese/us/generic.

r3 looks for a template specific to a product, an intl, and a page. The actual locations that r3 looks in for each product or intl are called elements. For example,

For example, when r3 builds a target, it looks for the template blah.ros, in frontpage/uk/index.php/. As a template, blah.ros is a domain object. r3 looks for it in element frontpage in dimension product, element uk in dimension intl, element blah.ros in dimension page.

By defining search paths when setting up a project, templates can be shared by different dimension elements. They can be moved or copied anywhere along the search path and then customized for a particular product or intl using a simple set of XML-like tags to change the generated output.

Templates can be based on any text-based source file, including PHP, HTML, JSP, XML, ASP, and TCL, and r3 creates the target files in the same format. Sophisticated users could even create Excel, Word or Acrobat files.