In our application we use an "errors" TMPL_LOOP variable -> the application code populates this variable with any errors, as in:

 push @errors, { message => translate("Some error text") };

then the templates:

 <TMPL_INCLUDE errors.tmpl>

where errors.tmpl contains

 <TMPL_IF errors>
   ... <TMPL_LOOP errors> ... <TMPL_VAR message> ... </TMPL_LOOP> ...
 </TMPL_IF>

Hope this helps,
Mathew

Jamie Krasnoo wrote:
Hi all,

I was just wondering what some of you do for displaying Errors to
forms and other sections of your script through HTML::Template. I'm
currently using CGI::Application and Data::FormValidator with H::T and
I'm finding that I'm defining errors within the template and using
<TMPL_IF> to display them if they're toggled. Using this method errors
can add up quite a bit. What method do you use to manage and display
them?

Thanks,

Jamie


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642
_______________________________________________
Html-template-users mailing list
Html-template-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/html-template-users



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Html-template-users mailing list
Html-template-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to