What do you think about PHPTAL?
View Single Post
01-07-2009, 01:09 PM
Join Date: Jan 2009
2 questions about PHPTal:
- first of all, I'm used to putting all logic concerning a certain part of the app in 1 PHP page. eg. a form to search and show results, would be in 1 PHP page with a show_form() and a search() functions, and a "if (!isset($_REQUEST['submit'])) show_form() else search()" statement. You get the point. What is the best way to do this, using PHPTal? AFAIK, you can only define 1 template in a file (contrary to e.g. patTemplate, which I used before).
Is the best way just using <tal:block condition="sumitted">...show results...</tal:block><tal:block condition="not:sumbitted">...show form...</tal:block> ?
- about the 3-dimensional array solution in this topic: isn't the goal of a templatingsystem that it should make the viewing of data unrelated to the php code ? If you first need to define the number of cols in your php code (by defining the array in such a way), then what is the goal of the templating? I'd like my template to make the decision about the number of cols ...
Is that possible?
View Public Profile
Send a private message to nightowl
Find More Posts by nightowl