Up to now, the server-side rendering of TopLogic interfaces has been done via write methods of tl:Control or tl:HTMLFragment implementations. The write methods use the API of tl:TagWriter to produce HTML structures with embedded dynamic content.
The generated HTML structure is difficult to recognize from the rendering code and this structure is not (easily) interchangeable to achieve alternative styling in themes.
Improvement
A domain-specific language for HTML template expressions is to be introduced with which the HTML structure generated by controls can be described, which is interchangeable via a theme but can still easily embed dynamic content of the model layer.
Theme editor
In addition to refactoring, the theme editor has been adapted so that declared theme variables of, for example, icon classes, are displayed in the variable table.
If a theme variable is created, edited or deleted in a theme A, then a theme B that extends theme A must be reloaded in order to see the changes in the variables table of theme B.
Test
- test.com.top_logic.html.template.TestHTMLTemplates
- test.com.top_logic.html.template.TestHTMLTemplatesApp