hello, im considering an implementation of a simillar jsp tags/template system for php...
one of the functionalities im thinking is a script engine somewhat near this :
<!-- example template file -->
<html>
<header>
<title>lala</title>
</header>
<body>
{template-for: start="1", end="5" step="1"}
<p>
repeated text
</p>
{/template-for}
{template-while: var1 = var2}
<p>
exemplo while 1
</p>
{/template-while}
{template-while}
<p>
exemplo while 2
</p>
{/template-while: var1 = var2}
{template-if: var1 = var2}
<p>
if var1 = var 2
</p>
{template-else}
<p>
if var1 = var 2
</p>
{template-endif}
<!-- this part \|/ is still messy :) -->
{template-sql: id="customVar" sql="SELECT * FROM fuu" connection="cnn1"}
<p>
{template-sql-print: customVar.record_id}
</p>
{/template-sqlselect}
{template-sql: id="customVar" preparedStatement="selectFullClientList" connection="cnn1"}
<p>
{template-sql-print: customVar.client_id}
</p>
{/template-sqlselect}
<!-- blah blah -->
</body>
</html>
the tags start with '{template' ans end with '{/template' because of in-line javascript functions....
what do you think of this? could it be worthy ?
thanks 😉