Teletext | Version 3

Teletext-Templates

Using teletext templates to define the layout of teletext pages

Archived documentation for Sophora 3. End-of-support date for this version: 7/25/21

Documentation for Sophora 4

Teletext templates define the layout of a teletext page (story, diagram, index or any self-defined teletext document type).

To define the visual appearance of a specific document, the field "Teletext: Layout der Seite" can be adjusted by selecting one of the available teletext templates. By default this field is placed on the Teletext tab, but may also be placed on the Metadata tab when there are very few occasions where the template needs adjusting.

Available for selection are all documents of the type sophora-teletext-nt:template. These documents (not to be mistaken for Sophora document templates) can be maintained and created by administrators. They are based on a template file (Texas-XML or ETP) that needs to be uploaded (in binary form) into the corresponding teletext template document. Also, there are fields for the number of header lines and footer lines that define how many lines from the top or bottom of the template document are imported into documents that use this template.

For example, if you define 3 header lines and 2 footer lines and apply this template to a teletext document, then the first three lines of the resulting teletext page are taken from the template file, followed by content from the actual document. Finally, the last two lines are taken from the template file again. The number of header and footer lines also determines the space that is left for content on each resulting teletext page.

On top of this, it is possible to adjust the header and footer lines without having to create different template documents. This is done by placing a variable name between two dollar-signs ($) inside the template file. Variables across line breaks are not supported. The dollar-signs and everything in between them will be substituted in the rendering process of the resulting teletext page. The space available for substitution can be defined by padding the variable name between the dollar-signs with whitespace. The alignment of the variable name corresponds to the alignment of the substituted content. Here's an example:

If the template file contained a line like the following

start $var1                        $ end

and the assignment for var1 was "middle", the result would be

start middle                         end

If, on the other hand, the line in the template looked like this (variable name right aligned)

start $                        var1$ end

the substitution would result in

start                         middle end

The assignment for each variable is determined by the customer-specific plugin code and may consist of any content from the document to be rendered or other sources.

Last modified on 3/9/20

The content of this page is licensed under the CC BY 4.0 License. Code samples are licensed under the MIT License.

Icon