html-template-users Mailing List for HTML::Template (Page 19)
Brought to you by:
samtregar
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(42) |
Jul
(80) |
Aug
(77) |
Sep
(97) |
Oct
(65) |
Nov
(80) |
Dec
(39) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(63) |
Feb
(47) |
Mar
(45) |
Apr
(63) |
May
(67) |
Jun
(51) |
Jul
(78) |
Aug
(37) |
Sep
(45) |
Oct
(59) |
Nov
(50) |
Dec
(70) |
2004 |
Jan
(23) |
Feb
(90) |
Mar
(37) |
Apr
(53) |
May
(111) |
Jun
(71) |
Jul
(35) |
Aug
(58) |
Sep
(35) |
Oct
(35) |
Nov
(35) |
Dec
(20) |
2005 |
Jan
(51) |
Feb
(19) |
Mar
(20) |
Apr
(8) |
May
(26) |
Jun
(14) |
Jul
(49) |
Aug
(24) |
Sep
(20) |
Oct
(49) |
Nov
(17) |
Dec
(53) |
2006 |
Jan
(12) |
Feb
(26) |
Mar
(45) |
Apr
(19) |
May
(19) |
Jun
(13) |
Jul
(11) |
Aug
(9) |
Sep
(10) |
Oct
(16) |
Nov
(17) |
Dec
(13) |
2007 |
Jan
(9) |
Feb
(12) |
Mar
(28) |
Apr
(33) |
May
(12) |
Jun
(12) |
Jul
(19) |
Aug
(4) |
Sep
(4) |
Oct
(5) |
Nov
(5) |
Dec
(13) |
2008 |
Jan
(6) |
Feb
(7) |
Mar
(14) |
Apr
(16) |
May
(3) |
Jun
(1) |
Jul
(12) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(9) |
2009 |
Jan
(9) |
Feb
|
Mar
(10) |
Apr
(1) |
May
|
Jun
(6) |
Jul
(5) |
Aug
(3) |
Sep
(7) |
Oct
(1) |
Nov
(15) |
Dec
(1) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
|
Jun
|
Jul
(5) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
(3) |
Mar
|
Apr
(28) |
May
|
Jun
|
Jul
(3) |
Aug
(4) |
Sep
(3) |
Oct
|
Nov
(8) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2016 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Sam T. <sa...@tr...> - 2006-05-17 15:00:00
|
On Wed, 17 May 2006, Matias Alejo Garcia wrote: >> Are you using caching? Are you pre-caching your templates during >> server startup? If so then you can have as many includes as you want >> and it won't make a bit of difference at runtime. > > Yes, we are using shared_cached. We are no precaching, but we will once we > reach our beta version. Yeesh - shared_cache is terrible. I really should remove it. It's no faster than file_cache and much more prone to problems. Both are much slower than regular cache mode. -sam |
From: Matias A. G. <ma...@ni...> - 2006-05-17 14:57:32
|
On 5/17/06, Sam Tregar <sa...@tr...> wrote: > > On Wed, 17 May 2006, Matias Alejo Garcia wrote: > > > So, some of our pages include 200 templates (we use shared_cached=3D>1)= . > These > > 'include' strategy helps our designer because its HTML code is > reutilized > > over and over. > > Would you say this is a correct approach? What about performace? I know > be > > need to benchmark, but it there any commets you can make? Thanks! > > Are you using caching? Are you pre-caching your templates during > server startup? If so then you can have as many includes as you want > and it won't make a bit of difference at runtime. Yes, we are using shared_cached. We are no precaching, but we will once we reach our beta version. Thanks! Great news! mat=EDas -sam > --=20 Mat=EDas Alejo Garc=EDa NITS Argentina | http://www.nits.com.ar |
From: Sam T. <sa...@tr...> - 2006-05-17 14:52:33
|
On Wed, 17 May 2006, Matias Alejo Garcia wrote: > So, some of our pages include 200 templates (we use shared_cached=>1). These > 'include' strategy helps our designer because its HTML code is reutilized > over and over. > Would you say this is a correct approach? What about performace? I know be > need to benchmark, but it there any commets you can make? Thanks! Are you using caching? Are you pre-caching your templates during server startup? If so then you can have as many includes as you want and it won't make a bit of difference at runtime. -sam |
From: Roger B. W. <ro...@fi...> - 2006-05-17 13:20:47
|
On Wed, May 17, 2006 at 09:00:53AM -0400, Dmitri Tikhonov wrote: >Oh, this is very neat. Is this it (confused by author name): >http://search.cpan.org/~djr/HTML-Template-Set-1.009/Set.pm No - mine predates that, but I didn't upload it to CPAN because while it is good enough for my use I don't think it's good enough for general distribution. >Maybe we can get Sam to integrate it into HTML::Template proper? That won't happen. >> Copy on request. >Not sure what you mean by that... If you would like a copy - it's very small, 689 bytes - let me know and I'll send it to you directly. Roger |
From: Philip T. <phi...@gm...> - 2006-05-17 13:10:16
|
Sometime Today, DT cobbled together some glyphs to say: > Maybe we can get Sam to integrate it into HTML::Template proper? Not going to happen. read list archives and documentation for why. -- God made everything out of nothing, but the nothingness shows through. -- Paul Valery |
From: Dmitri T. <dti...@vo...> - 2006-05-17 13:00:40
|
On Wed, 2006-05-17 at 08:54 -0400, Roger Burton West wrote: > On Wed, May 17, 2006 at 08:51:02AM -0400, Dmitri Tikhonov wrote: > > >1. Is this feasible to implement? > > I have done that very thing in my HTML::Template::Set extension > module. Oh, this is very neat. Is this it (confused by author name): http://search.cpan.org/~djr/HTML-Template-Set-1.009/Set.pm Maybe we can get Sam to integrate it into HTML::Template proper? > Copy on request. Not sure what you mean by that... - Dmitri. |
From: Roger B. W. <ro...@fi...> - 2006-05-17 12:54:22
|
On Wed, May 17, 2006 at 08:51:02AM -0400, Dmitri Tikhonov wrote: >1. Is this feasible to implement? I have done that very thing in my HTML::Template::Set extension module. Copy on request. Roger |
From: Dmitri T. <dti...@vo...> - 2006-05-17 12:50:49
|
Dear List, In most of my templates, I have a header and a footer templates that get included from the main template, which I assume is a very common scenario. My problem is that <title> tag is in the header template and it needs to change for each template. There are two approaches that I can currently use: 1. Put <title> tag into main template. This works, but I do not believe having <title> outside of <head> is correct HTML[1]. 2. Set title from CGI script. This is not very convenient and, in my mind, breaks the paradigm. The best solution, in my mind, would be something like this: ---- template search_results.tmpl ---- <TMPL_SET NAME='TITLE' VALUE='Search Results'> <!-- this is where title is used --> <TMPL_INCLUDE NAME="_header.tmpl"> <some_html_here> <TMPL_INCLUDE NAME="_footer.tmpl"> ---- end of template ---- Questions: 1. Is this feasible to implement? 2. Is such feature compatible with HTML::Template philosophy? 3. (Bonus question) is there another approach besides the two above that I can use right now? Thank you, - Dmitri. 1. http://www.w3.org/TR/html401/struct/global.html#h-7.4.2 |
From: Roger B. W. <ro...@fi...> - 2006-05-17 12:35:46
|
On Wed, May 17, 2006 at 09:21:35AM -0300, Matias Alejo Garcia wrote: >2) Wouldn't be nice to have a template comment tag? You can get the same effect with: <tmpl_if name=i_am_never_going_to_set_this_variable> comments here </tmpl_if> Roger |
From: Matias A. G. <ma...@ni...> - 2006-05-17 12:21:46
|
Hi all! I've been using Template::HTML for 3 months, I would like to ask you a few questions 1) In our project we are using around 50 different templates, It is very common for us to do something like: <tmpl_loop departments> <tmpl_if show_picture> <tmpl_if picture_url> <tmpl_include user_picture.tmpl> </tmpl_if> </tmpl_if> <tmpl_if users> <tmpl_loop> <tmpl_include show_user.tmpl> </tmpl_loop> </tmpl_if> </tmpl_loop> So, some of our pages include 200 templates (we use shared_cached=3D>1). Th= ese 'include' strategy helps our designer because its HTML code is reutilized over and over. Would you say this is a correct approach? What about performace? I know be need to benchmark, but it there any commets you can make? Thanks! 2) Wouldn't be nice to have a template comment tag? I think it would be useful to describe template, and not generate HTML. Fo= r example: <!-- <tmpl_comment> This template shows a user. bla bla Inputs: - bla bla </tmpl_comment> --> or <!-- # This template shows a user. bla bla # Inputs: # - bla bla --> In our project we 'compile' the templates before installing to production, so normal HTML comments are taken away, but I think that the 'comment' tag would be interesting to have. Thanks! mat=EDas --=20 Mat=EDas Alejo Garc=EDa NITS Argentina | http://www.nits.com.ar |
From: Jamie K. <jkr...@gm...> - 2006-04-28 18:13:25
|
Thanks Dan, Good suggestion. I'll look in to it. On 4/27/06, Dan Horne <dan...@re...> wrote: > Hi > > Since you're using CGI::Application, have a look at > CGI::Application::Plugin::MessageStack > > Dan > > > -----Original Message----- > > From: htm...@li... > > [mailto:htm...@li...] On > > Behalf Of Jamie Krasnoo > > Sent: Friday, 28 April 2006 08:15 > > To: htm...@li... > > Subject: [htmltmpl] Template Error Managment > > > > > > 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=3Dk&kid=120709&bid&3057&dat=121642 > > _______________________________________________ > > Html-template-users mailing list > > Htm...@li... > > https://lists.sourceforge.net/lists/listinfo/html-template-users > > > > |
From: Dan H. <dan...@re...> - 2006-04-27 23:32:30
|
Hi Since you're using CGI::Application, have a look at CGI::Application::Plugin::MessageStack=20 Dan > -----Original Message----- > From: htm...@li...=20 > [mailto:htm...@li...] On=20 > Behalf Of Jamie Krasnoo > Sent: Friday, 28 April 2006 08:15 > To: htm...@li... > Subject: [htmltmpl] Template Error Managment >=20 >=20 > Hi all, >=20 > I was just wondering what some of you do for displaying=20 > Errors to forms and other sections of your script through=20 > HTML::Template. I'm currently using CGI::Application and=20 > Data::FormValidator with H::T and I'm finding that I'm=20 > defining errors within the template and using <TMPL_IF> to=20 > display them if they're toggled. Using this method errors can=20 > add up quite a bit. What method do you use to manage and display them? >=20 > Thanks, >=20 > Jamie >=20 >=20 > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web=20 > services, security? Get stuff done quickly with=20 > pre-integrated technology to make your job easier Download=20 > IBM WebSphere Application Server v.1.0.1 based on Apache=20 > Geronimo=20 > http://sel.as-us.falkag.net/sel?cmd=3Dk&kid=120709&bid&3057&dat=121642 > _______________________________________________ > Html-template-users mailing list=20 > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users >=20 |
From: Mathew R. <mat...@ne...> - 2006-04-27 23:28:03
|
In our application we use an "errors" TMPL_LOOP variable -> the=20 application code populates this variable with any errors, as in: push @errors, { message =3D> 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, securit= y? > 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 Geron= imo > http://sel.as-us.falkag.net/sel?cmd=3Dk&kid=120709&bid&3057&dat=121642 > _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users > =20 |
From: Jamie K. <jkr...@gm...> - 2006-04-27 20:14:40
|
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 |
From: Mathew R. <mat...@ne...> - 2006-04-26 23:28:49
|
Hi Sam, The highly modified version of H::T that I use, does contain an extensible ESCAPE plugin mechanism - main features: - users can plugin their own ESCAPEs by deriving from H::T::ESCAPE - ESCAPE modules are loaded at parse-time - extra escaping modules: DOUBLE_QUOTE - which simply puts double quotes around the TMPL_VAR STRIP_NEWLINE - does as it says The only items that I haven't specifically addressed in the escape-loader: - I havent tested it against H::T::Expr 0.07 yet... - the path that the modules loaded from; the current implementation does: eval "use HTML::Template::ESCAPE::${escape};"; This has the effect that user-defined modules need to located in the system-directories rather than user-directories (which should be an easy fix) It shouldn't be too much work to send a patch... Mathew Sam Tregar wrote: > On Wed, 26 Apr 2006, Jim Spath wrote: > >> Just joined the list... excuse me if this has been posted before, but I >> didn't find a good way to search the mailing list archives. >> >> I use HTML::Template for XML templates frequently, and think that >> ESCAPE=XML would be a useful addition. So far as I know HTML escaping >> and XML escaping are slightly different. > > Patches welcome. I'd take it either as a patch adding just these > escapes or as a system allowing users to plugin new escape code (which > others have asked for before). > > -sam > > > ------------------------------------------------------- > 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&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users |
From: Sam T. <sa...@tr...> - 2006-04-26 19:37:37
|
On Wed, 26 Apr 2006, Jim Spath wrote: > Just joined the list... excuse me if this has been posted before, but I > didn't find a good way to search the mailing list archives. > > I use HTML::Template for XML templates frequently, and think that > ESCAPE=XML would be a useful addition. So far as I know HTML escaping > and XML escaping are slightly different. Patches welcome. I'd take it either as a patch adding just these escapes or as a system allowing users to plugin new escape code (which others have asked for before). -sam |
From: Andrew B. <an...@br...> - 2006-04-26 18:42:44
|
On 4/26/06 at 1:08 PM, js...@fo... (Jim Spath) wrote: > Hi all, >=20 > Just joined the list... excuse me if this has been posted before, but > I didn't find a good way to search the mailing list archives. At the bottom of all list messages is a link to the list info page. From there you can view and search the archive. Also available at <http://www.mail-archive.com/html-template-users%40lists.sourceforge.net /> >=20 > _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users |
From: Tom H. <tom...@pu...> - 2006-04-26 18:36:39
|
Jim Spath wrote: > Hi all, > > Just joined the list... excuse me if this has been posted before, but I > didn't find a good way to search the mailing list archives. > > I use HTML::Template for XML templates frequently, and think that > ESCAPE=XML would be a useful addition. So far as I know HTML escaping > and XML escaping are slightly different. > > Thanks! > - Jim Spath > How are they different? From here: http://www.w3.org/TR/2000/REC-xml-20001006#syntax (&) => "&" (<) => "<" (>) => ">" (') => "'" (") => """ What other escaping is necessary for XML? Tom |
From: Jim S. <js...@fo...> - 2006-04-26 17:08:12
|
Hi all, Just joined the list... excuse me if this has been posted before, but I didn't find a good way to search the mailing list archives. I use HTML::Template for XML templates frequently, and think that ESCAPE=3DXML would be a useful addition. So far as I know HTML escaping and XML escaping are slightly different. Thanks! - Jim Spath |
From: Sam T. <sa...@tr...> - 2006-04-19 04:39:22
|
CHANGES - Added support for ESCAPE attribute in combination with EXPR. (Michael Peters) - Fixed a bug where functions which returned 0 or more than one return value would cause a stack under or overflow. Functions are now called in scalar context, eliminating the problem. Thanks to Jamie Krasnoo for the spot. DESCRIPTION This module provides an extension to HTML::Template which allows expressions in the template syntax. This is purely an addition - all the normal HTML::Template options, syntax and behaviors will still work. Expression support includes comparisons, math operations, string operations and a mechanism to allow you add your own functions at runtime. AVAILABILITY This module is available on SourceForge. Download it at: http://html-template.sourceforge.net The module is also available on CPAN. You can get it using CPAN.pm or go to: http://www.cpan.org/authors/id/S/SA/SAMTREGAR/ CONTACT INFO You can join the HTML::Template mailing-list by visiting: http://lists.sourceforge.net/lists/listinfo/html-template-users |
From: Sam T. <sa...@tr...> - 2006-04-18 17:56:55
|
On Fri, 14 Apr 2006, Michael Peters wrote: >> I'll try my simple approach and see how that works first. > > This is a very simple (naive?) approach, so I may have missed something, > but it seems to work. Thanks, applied! -sam |
From: Michael P. <mp...@pl...> - 2006-04-14 18:21:54
|
Michael Peters wrote: > > Sam Tregar wrote: >> On Fri, 14 Apr 2006, Michael Peters wrote: >> >>> So by making the "parser smart enough" do you mean copying that huge >>> regex from H::T and modifying it with the expr regex? >> Yeah, or using Parse::RecDescent. H::T::E already uses it for >> expressions, so using it for parsing the template itself might not be >> much slower. > > I'll try my simple approach and see how that works first. This is a very simple (naive?) approach, so I may have missed something, but it seems to work. -- Michael Peters Developer Plus Three, LP |
From: Sam T. <sa...@tr...> - 2006-04-14 17:52:48
|
On Fri, 14 Apr 2006, Michael Peters wrote: > Yeah, that makes sense, I guess I didn't really think it through. Would > it make sense though to allow it to be used if the entire expression > returned false? No, I don't. Default for normal variables is only used when a value isn't set, false or undefined both count. I suppose I could be persuaded though if a good use-case was presented. -sam |
From: Michael P. <mp...@pl...> - 2006-04-14 17:31:43
|
Sam Tregar wrote: > On Fri, 14 Apr 2006, Michael Peters wrote: > >> So by making the "parser smart enough" do you mean copying that huge >> regex from H::T and modifying it with the expr regex? > > Yeah, or using Parse::RecDescent. H::T::E already uses it for > expressions, so using it for parsing the template itself might not be > much slower. I'll try my simple approach and see how that works first. >> It looks like it also doesn't support 'default'. > > What the heck would default do for expressions? I can't think of > anything reasonable... There's no single variable to examine for a > value in the general case. Yeah, that makes sense, I guess I didn't really think it through. Would it make sense though to allow it to be used if the entire expression returned false? >> A very simple approach would be to take any tmpl_vars/loops, etc that >> use expr and capture anything before the expr="..." and after it and >> then just add them to the generated tags. This however doesn't solve the >> sub-ref problem. > > What's the sub-ref problem? I'm not sure :) I think I just mis-read your other email. -- Michael Peters Developer Plus Three, LP |
From: Sam T. <sa...@tr...> - 2006-04-14 17:22:22
|
On Fri, 14 Apr 2006, Michael Peters wrote: > So by making the "parser smart enough" do you mean copying that huge > regex from H::T and modifying it with the expr regex? Yeah, or using Parse::RecDescent. H::T::E already uses it for expressions, so using it for parsing the template itself might not be much slower. > It looks like it also doesn't support 'default'. What the heck would default do for expressions? I can't think of anything reasonable... There's no single variable to examine for a value in the general case. > A very simple approach would be to take any tmpl_vars/loops, etc that > use expr and capture anything before the expr="..." and after it and > then just add them to the generated tags. This however doesn't solve the > sub-ref problem. What's the sub-ref problem? -sam |