Page Templates

Page Templates

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

Page Templates

fbarbosafbarbosa112003-01-24T16:51:00Z2003-01-24T16:53:00Z32711549ZIM Technologies12319029.3821

Page Templates

ZimWeb includes page template support. This allows you to combine parameters from Zim with the page (web page, etc.) delivered to the client.

Template file format

A page template is just a regular page (HTML etc.), with parameter placeholders to indicate where each parameter to be supplied by the Zim application is to be placed. This template can be designed easily with your normal web page design tool.

 

The parameters placeholders are formatted like HTML comments (e.g. so for a parameter named company you would use a parameter placeholder ).

 

Note: the parameter and the parameter placeholder must be in the same case.

 

The page template processor will substitute the value of the parameter for the parameter placeholder. If the value of a parameter in a placeholder is not supplied, its value will be assumed to be blank. You can use the same parameter placeholder more than once in a given template.

Sample template customer.htm


 
  

Customer Details

  

   

    

    

   

   

    

    

   

  

Customer Code
Customer Name

 

Parameter XML format

The Zim application supplies the values of parameters in an XML format.

The root element can have any name. The parameter names are the names of the elements which are children of the root element. The character content of each of the children of the root element is the value of the parameter.

 

An easy way to demonstrate this is by the following example:

Sample XML data



 1007
 

 

Note the use of the CDATA section in the above to allow the company parameter to include any characters. Alternatively the “&” character could have been replaced by its corresponding entity &.


 

Was this article helpful?
5 out of 5 stars

1 rating

5 Stars 100%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

pt_BRPortuguese