For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > September 2004 > Introspection on templates









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Introspection on templates
Dan Phiffer

2004-09-11, 8:56 am

Hello,

I'm considering Smarty to use on a web application I'm putting together,
and I had a question about how I might take this:

<html>
<body>
Name: {$name}<br>
Address: {$address}<br>
</body>
</html>

And turn it into this:

<form action="./">
<input type="text" name="name"/>
<input type="text" name="address"/>
<input type="submit"/>
</form>

....without prior knowledge of the .tpl file. I understand this could get
complicated, should there be control structures like looping or if/else,
but I'm just curious if this has been done, or perhaps it hasn't and
this is a bad idea?

Thanks,
-Dan

I'm fairly new to Smarty
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com