SR2 SupportCenterCaps

Contact Support
 

Email:
support@refreshsoftware.com

Phone:
508-318-4480


  Link to this page

Home >  Developer Resources >  Developing Templates

Developing Templates

A SR2 template is the code structure that you develop to display the graphics, content, and links that comprise a specific type of asset on your site.  For example, you might use one template to display press releases and another to display management biographies. 

Retrieving asset content or metadata is no different from using any other language function. It's just a matter of including a call that interacts with the SR2 Content Server. This results in a Content Object from which you can extract appropriate content and other values. Therefore, when a site visitor opens a asset, (s)he will see the content structured as you specified. 

SR2 imposes no constraints on how you code templates; it is simply the repository of the content that will appear on the assets based on the templates.  Note, however, that - because the SR2 Content Server includes parent/child navigational metadata about each asset - you can include site navigation rules so that when a user adds a content object, the associated navigational controls appear on the Web site automatically, based on an association with another object.  For example, the template for SR2 documentation uses the navigational information about each asset to construct the Contents list at the left.

You may develop templates using any scripting language. To get you started quickly, we provide sample templates and support files for:

To see a template sample, click on one of the links above.

When developing templates, you may use your usual development environment, tools, etc.  SR2 also provides several Include files that contain constants, functions, and examples for building sites.

Furthermore, you can interact with SR2 tables using any programming language that supports SQL, connectivity to the Content Server, and regular expressions (including Visual Basic, C++, and Java).

Development Process

The general development process you follow when developing applications that use SR2-based content is probably not appreciably different from your normal process:

  1. Develop the code as you normally would, using your usual development environment, tools, etc. As noted above, SR2 provides several Include files that provide constants, functions, and examples for building sites. See Include Files for more information. For examples of template files, see Chapter 4: Examples.
  2. Upload the template to the Content Domain and identify it to SR2 so that it can use the template to display content (published or preview).
  3. Once a template is uploaded using SR2, the file will reside in the %SR2Install%/%ContentDomain%/ directory. e.g. e:\SiteRefresh\www\mywebsite