[fpc-pascal] Freepascal templating engines with logical structures

luciano de souza luchyanus at gmail.com
Wed Sep 17 06:51:06 CEST 2014


Hello all,

I Know two templating engines for Freepascal: FPTemplate e JTemplate.
Both can be successfully used for html construction.

But they presents the same aspect: only searches and replaces tags to values.

Of course, it's crucial. But to show html grids, obtained from
database queries, it would be better if the templating engine had
support for logical structures. Something like:

<table>
<%
for row in rows do
begin
write('<tr>');
for cell in cells do
writeln('<td>%s</td>', [cell]);
write('</tr>');
end;
%>
</table>

It's only an example. The engine can use a syntax different from Pascal.

 But what I really like is not to use Javascript. Yes, in the Pascal
side, I could write a JSON and certainly, there would be several
Javascript libraries to show a grid from a JSON. However, I would like
a pure Pascal solution.

Are there templating engines in Pascal with support for logical structures?

Regards,

-- 
Luciano de Souza



More information about the fpc-pascal mailing list