Templates Templates are text or files that Tempus Serva will output content to, when displaying a userinterface or exporting a record. Export templates Export templates are binary files uploaded to the template, containing special tags where the content from Tempus Serva fields should be inserted. Transformation of tables, files etc. is done automatically. An example for a Word report is found here: Word documents from templates DOCX / Word limitations Content can inserted most places in the document, except for the following Page header and footers Document metadata Due to Microsoft Word everchanging document format, it is not possible to preserve the all styling of text inserted into drawing building blocks (textareas,circles etc.). Normal formatting will be preserved Special properties like angle will be lost PDF templates PDF templates a basically Word templates transformed to PDF afterwards. To build PDF's just upload a normal docx template, and change the type to PDF after upload. To enable docx to pdf conversion the configuration 'servicePdfConverter' has to be set up. To do this, first a token has to be generated and inserted into the database on the convert server. This token has to be added to the value of 'servicePdfConverter', after the url. The value of 'servicePdfConverter' should then look like: https://convert.tempusserva.dk/Word2pdf/Word2pdf?token=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX Form templates Structure and syntax The structure of the tags in the HTML template are {header} {tablename} {pageselector} {default_start} {default_name} {default_value} {default_help} {default_end} {defaultField} {footer} You may also add additional tags for special fields: "{" + [field systemname] + "_name}" "{" + [field systemname] + "_value}" "{" + [field systemname] + "_help}" Template handling Templates are injected with values from the current record like this For each field Try to inject [system fieldname] + [prefix] If failed Copy content from {default_start} to {default_end} Inject values into content copy Inject content copy into {defaultField} Inject the form page selector into {pageselector} If failed: Ignore Missing values for default_XXX tags wil automatically get appended to the template. Relation til styling type class id content template tbody PAGE_[field PageID] Container for a single field {default_start} / {default_end} div FieldLabel NB_[system fieldname] Label for field {default_name} div FieldValue VB_[system fieldname] Value of field / Input for field {default_value} div FieldNotes HB_[system fieldname] Optional help text for the field {default_help} Example {header}
| {pageselector} |
{default_name} |
|
{default_value} {default_help} |