[fpc-pascal] Freepascal templating engines with logical structures

leledumbo leledumbo_cool at yahoo.co.id
Wed Sep 17 13:23:14 CEST 2014


> What you seem to want is something php-like, to interpret commands from 
the html template. But that way the program logic and display template 
would not be separate.

Right, even a simple for/if statement means there's logic in the template,
which is not desirable. Template should serve as a template, not more. It
should provide parameters for the processing code for flexible display so
flexible display can still work. Here's an example for table and list
formatting of the same values:

https://github.com/leledumbo/QTemplate/blob/master/examples/simple/test.tpl
https://github.com/leledumbo/QTemplate/blob/master/examples/simple/test.lpr




--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Freepascal-templating-engines-with-logical-structures-tp5720098p5720102.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.



More information about the fpc-pascal mailing list