html-template-users Mailing List for HTML::Template (Page 100)
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: Philip S T. <phi...@gm...> - 2002-08-27 06:54:48
|
On Mon, 26 Aug 2002, Kenny Smith wrote: > Isn't that the way it is done in perl? You can only access vars in the > current loop, enclosing loops, and the global scope. yeah, but not if two variables share the same name. I'd like to be able to separately specify which loop's var I want. -- "More software projects have gone awry for lack of calendar time than for all other causes combined." -- Fred Brooks, Jr., _The Mythical Man Month_ |
From: Kenny S. <ke...@jo...> - 2002-08-27 06:36:05
|
> Advantage is that you can access a global var from any > level of the loop. An imposed restriction could be > that only elements from the current loop stack can be > called, ie, you can't access vars across > loops, only upwards from the current location. Isn't that the way it is done in perl? You can only access vars in the current loop, enclosing loops, and the global scope. Kenny |
From: Philip S T. <phi...@gm...> - 2002-08-27 05:29:33
|
On Wed, 28 Aug 2002, Sam Tregar wrote: > Oh, good. I was under the mistaken impression that something big was > missing (<tmpl_include>, loops within loops, etc.). Sorry to sling > undeserved mud in your direction! tmpl_include was probably the first thing implemented. loops within loops existed, but weren't documented, so people thought they didn't exist. That's been corrected through the online tutorial. -- Fill what's empty, empty what's full, scratch where it itches. -- Alice Roosevelt Longworth |
From: Sam T. <sa...@tr...> - 2002-08-27 05:17:55
|
On Tue, 27 Aug 2002, Philip S Tellis wrote: > On Tue, 27 Aug 2002, Sam Tregar wrote: > > > Maybe this one will even support the full template syntax! (hint, > > hint) > > well, apart from die_on_bad_params, global_vars and cache stuff, I'm > pretty certain that HTML.Template.java supports everything that > HTML::Template does and nothing more ;) die_on_bad_params I should have > soon, global vars I probably won't, and I'd like to hear people's > thoughts on this. Oh, good. I was under the mistaken impression that something big was missing (<tmpl_include>, loops within loops, etc.). Sorry to sling undeserved mud in your direction! -sam |
From: Philip S T. <phi...@gm...> - 2002-08-27 05:17:17
|
On Mon, 26 Aug 2002, Kenny Smith wrote: > I probably wouldn't use it without the global_vars option. I use the > global_vars option all the time, it's too useful to be without. I really feel that it should be done some other way - with some kind of namespaces or something similar to DOM objects. HTML designers are already familiar with the document.myform.txtName.value syntax, don't think they'd mind a document.loop1.loop2.var1 style syntax. Advantage is that you can access a global var from any level of the loop. An imposed restriction could be that only elements from the current loop stack can be called, ie, you can't access vars across loops, only upwards from the current location. Thoughts? -- Reality continues to ruin my life. -- Calvin |
From: Kenny S. <ke...@jo...> - 2002-08-27 05:11:44
|
> global vars I probably won't, and I'd like to hear > people's thoughts on this. Hi Philip, I probably wouldn't use it without the global_vars option. I use the global_vars option all the time, it's too useful to be without. Kenny |
From: Philip S T. <phi...@gm...> - 2002-08-27 04:59:38
|
On Tue, 27 Aug 2002, Sam Tregar wrote: > Maybe this one will even support the full template syntax! (hint, > hint) well, apart from die_on_bad_params, global_vars and cache stuff, I'm pretty certain that HTML.Template.java supports everything that HTML::Template does and nothing more ;) die_on_bad_params I should have soon, global vars I probably won't, and I'd like to hear people's thoughts on this. cache stuff I don't know how to, so if someone wants to volunteer help, I'll be most delighted :P Philip -- Do not meddle in the affairs of dragons, because you are crunchy and taste good with ketchup. |
From: Sam T. <sa...@tr...> - 2002-08-27 02:58:11
|
On Mon, 26 Aug 2002, Philip S Tellis wrote: > Just saw this at sourceforge: http://sf.net/projects/html-tmpl-cpp/ > > Nothing released or in CVS yet, but it's a good sign. Maybe this one will even support the full template syntax! (hint, hint) -sam |
From: Philip S T. <phi...@gm...> - 2002-08-26 08:43:31
|
Just saw this at sourceforge: http://sf.net/projects/html-tmpl-cpp/ Nothing released or in CVS yet, but it's a good sign. Philip -- There will always be beer cans rolling on the floor of your car when the boss asks for a ride home from the office. |
From: Sam T. <sa...@tr...> - 2002-08-21 16:52:07
|
On Wed, 21 Aug 2002, Francesco Martelli - HalNet wrote: > is: > > sysread TEMPLATE, $self->{template}, -s TEMPLATE; > > faster than current: > > while (read(TEMPLATE, $self->{template}, 10240, length($self->{template}))) > {} Almost certainly not, but the only way to find out is to test! See the Benchmark module for a good place to start. -sam |
From: Jesse E. <je...@er...> - 2002-08-21 12:21:13
|
Hi Andrew -- > Now I am looking to build an entire site using H-T. All pages will > contain content from the database and be generated from templates. Since > I haven't used H-T this way before, I have some questions. Have you through about using something like PageKit?: http://www.pagekit.org/ PageKit uses HTML::Template to control every page, and XML on the back-end to provide data. I would imagine that something like this could be used to do what you have described. (I've never used PageKit before.) TTYL, -Jesse- -- Jesse Erlbaum The Erlbaum Group je...@er... Phone: 212-684-6161 Fax: 212-684-6226 |
From: Philip S T. <phi...@gm...> - 2002-08-21 10:53:12
|
On Wed, 21 Aug 2002, Philip S Tellis wrote: > Version 0.1.0 of HTML.Template.java has just been released. It's still And for those of you who don't have the URL, it's http://html-tmpl-java.sourceforge.net/ Philip |
From: Philip S T. <phi...@gm...> - 2002-08-21 06:18:46
|
Version 0.1.0 of HTML.Template.java has just been released. It's still a development release, but is getting stable. A few bug fixes, and enhancements. Also added the Filter interface. Following is the ChangeLog ver 0.1.0 - supports Hashtable style constructor parameter - Now also accepts Booleans and Integers in constructor parameters, not just Strings - path parameter accepts a single String as well as an array of Strings - setParam also accepts int, boolean, Integer and Boolean - added Filter interface - fixed bug that prevented file handle from working (thanks to Marcos Ramirez) - fixed case bug with include filenames |
From: Francesco M. - H. <fra...@hl...> - 2002-08-20 22:53:33
|
is: sysread TEMPLATE, $self->{template}, -s TEMPLATE; faster than current: while (read(TEMPLATE, $self->{template}, 10240, length($self->{template}))) {} ?? currently is used 'read' cause '-s' portability problems? |
From: Jeff P. <jp...@gr...> - 2002-08-19 23:20:02
|
> I suggest you use fetchrow_arrayref or fetchall_arrayref. The output from > the latter is the same as from selectall_arrayref, but you get to use > cacheing, placeholders, and so on, as normal. > > Roger Thanx Roger! I got that to work and once I saw how that worked, I figured out how to get the old standby fetchrow_array to work too! I appreciate the help! Jeff. |
From: Todd S. <zo...@pa...> - 2002-08-19 17:10:03
|
Hi Andrew, If you use the GET method for your script, the users will be able to book mark pages and most search engines should be able to crawl through your site. You can set up Apache to redirect to a script. For instance you could have /index.html redirect to your script. Then the script would look at the URL requested to build the appropriate page. That way users could book mark pages and search engines could crawl your site and none would be the wiser. H::T is a great module that will work great for your project. Good luck, Todd -----Original Message----- From: htm...@li... [mailto:htm...@li...]On Behalf Of Andrew Brosnan Sent: Monday, August 19, 2002 8:30 AM To: HTML::Template List Subject: [htmltmpl] using H-T for every page Hello, I have been using H-T mostly for user interfaces to databases where users make queries via HTML forms sent to H-T scripts which return results. Works great (thanks Sam!). Now I am looking to build an entire site using H-T. All pages will contain content from the database and be generated from templates. Since I haven't used H-T this way before, I have some questions. Would requests for domain.com and/or domain.com/index.html be redirected to domain.com/scriptname right in Apache? I assume all links and pages will be domain.com/scriptname+params rather than domain.com/page.html. I'm wondering how this affects things like search engine indexing, users bookmarking pages, providing links to areas within the site. It seems like all pages will have kind of a funky URL. I would appreciate comments on the above from those who have more experience. Also any other comments on the architecture of a project like this are appreciated. Thank you, Andrew ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ Html-template-users mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/html-template-users |
From: Kenny S. <ke...@jo...> - 2002-08-19 15:58:42
|
Hi Andrew, I do exactly what you are talking about, so that I can use the same nav/header include and have it dynamically generated each time. I use apache with mod_rewrite (a standard mod), and I setup a rule that any request for http://www.journalscape.com/something.html gets sent to http://www.journalscape.com/js.mod_perl with $ENV{'PAGE'} = something.html The URL in the browser doesn't change, so they are none the wiser, and I get the flexibility of H::T. This is the rule that I use to grab only html in the webroot of the site: RewriteRule ^/([^/^.]+\.html)$ /path/js.mod_perl [E=PAGE:$1,L] Kenny Smith JournalScape.com > Would requests for domain.com and/or > domain.com/index.html be redirected > to domain.com/scriptname right in Apache? > > I assume all links and pages will be > domain.com/scriptname+params rather > than domain.com/page.html. I'm wondering how this > affects things like > search engine indexing, users bookmarking pages, > providing links to > areas within the site. It seems like all pages will > have kind of a funky > URL. |
From: Andrew B. <an...@br...> - 2002-08-19 15:31:08
|
Hello, I have been using H-T mostly for user interfaces to databases where users make queries via HTML forms sent to H-T scripts which return results. Works great (thanks Sam!). Now I am looking to build an entire site using H-T. All pages will contain content from the database and be generated from templates. Since I haven't used H-T this way before, I have some questions. Would requests for domain.com and/or domain.com/index.html be redirected to domain.com/scriptname right in Apache? I assume all links and pages will be domain.com/scriptname+params rather than domain.com/page.html. I'm wondering how this affects things like search engine indexing, users bookmarking pages, providing links to areas within the site. It seems like all pages will have kind of a funky URL. I would appreciate comments on the above from those who have more experience. Also any other comments on the architecture of a project like this are appreciated. Thank you, Andrew |
From: Roger B. W. <ro...@fi...> - 2002-08-19 09:46:19
|
On Sun, Aug 18, 2002 at 01:21:16PM -0500, Jeff Pelkey wrote: >I am having a small problem using DBI and HTML::Pager and was wondering if >somebody could tell me where I am going wrong. First, I'll state that I >have normally used "fetchrow_array" with H-T and had no problems. I read >that you need to use "selectall_arrayref", which I have never used - so I am >very unfamiliar with them. I get no errors, but I also get no data passed >to the template when I should receive 52 rows returned to the template. Check the documentation for DBI. selectall_arrayref expects an actual SQL statement (text) as its argument, not a statement handle. I suggest you use fetchrow_arrayref or fetchall_arrayref. The output from the latter is the same as from selectall_arrayref, but you get to use cacheing, placeholders, and so on, as normal. Roger |
From: simran <si...@cs...> - 2002-08-19 07:01:25
|
Hi All, In HTML::Template verison 2.5 i noticed the following code: ##### LINE 932 +++ ======================================================================= # load in options supplied to new() for (my $x = 0; $x <= $#_; $x += 2) { defined($_[($x + 1)]) or croak("HTML::Template->new() called with odd number of option parameters - should be of the form option => value"); $options->{lc($_[$x])} = $_[($x + 1)]; } ======================================================================= Now i am calling HTML::Template with parameters such as: my $class = shift; $a = new HTML::Template( filename => $filename, other_parameter => (ref($class) ? $class : undef) ); This is causing the issue whereby because the for loop above (in the code) is checking for the "defined-ness" of the "value" (which in some cases for me is not defined) - it croaks... however, it is valid to have a has with a defined key but an undefined value, so i am not really passing the new method an "odd number of parameters". We can of course check how many elements were passed (including undef values) by doing something like: croak "Odd number of parameters" if ($#_ % 2 == 0); or even croak "Odd number of parameters" if (scalar @_ % 2 != 0); I haven't provided a patch as its only a one line partial change. Also, i can't see any of the current scripts breaking by doing it in the method listed just above. What say ye Sam? simran. |
From: Jeff P. <jp...@gr...> - 2002-08-18 18:21:26
|
Howdy! I am having a small problem using DBI and HTML::Pager and was wondering if somebody could tell me where I am going wrong. First, I'll state that I have normally used "fetchrow_array" with H-T and had no problems. I read that you need to use "selectall_arrayref", which I have never used - so I am very unfamiliar with them. I get no errors, but I also get no data passed to the template when I should receive 52 rows returned to the template. Here's the code: $strSQL = qq/SELECT sessionkey, security, username, realname FROM UserTable ORDER BY sessionkey/; $hST = $hDB->prepare_cached($strSQL) or die "Cannot Prepare the SQL Statement: DBI::errstr\n"; my $tmpl = HTML::Template->new(filename => 'testtmpl.tmpl'); my $query = new CGI; # This script does not use this - future ref. my $data = $hDB->selectall_arrayref($hST) or die "Cannot Execute the SQL Statement: $DBI::errstr\n"; my $get_data_sub = sub { my ($offset, $rows) = @_; my @return_array; for (my $x = 0; $x < $rows; $x++) { push(@return_array, [ $data[$offset + $x ]{sessionkey}, $data[$offset + $x ]{security}, $data[$offset + $x ]{username}, $data[$offset + $x ]{realname} ] ); } return \@return_array; }; # End of GetDataSub Routine # create a Pager object my $pager = HTML::Pager->new( # required parameters template => $tmpl, query => $query, get_data_callback => $get_data_sub, rows => 52, page_size => 5 ); print $pager->output; Any help would be greatly appreciated. Thanx, Jeff Pelkey |
From: David V. <htm...@dv...> - 2002-08-14 20:12:51
|
> -----Original Message----- > From: htm...@li... > [mailto:htm...@li...] On > Behalf Of Brian McCain > Sent: Wednesday, August 14, 2002 2:59 PM > To: htm...@dv... > Cc: Htm...@li... > Subject: Re: [htmltmpl] Nesting Templates > > Why not just stick the block of HTML, tmpl_vars and all, into > another template, and then anywhere you have that block, > replace it with <tmpl_include > name="/path/to/your/include/template.tmpl">? That would work, but I'd rather stay away from include files. I'm really hoping to keep all the content and markup in the database, where I can retrieve it and send it as a scalarref... the fewer separate places content is located, the cleaner and the better. ] David Veatch ] dv...@dv... ] http://dvicci.com/ |
From: Brian M. <bm...@pa...> - 2002-08-14 19:58:27
|
Why not just stick the block of HTML, tmpl_vars and all, into another template, and then anywhere you have that block, replace it with <tmpl_include name="/path/to/your/include/template.tmpl">? Brian McCain PageMasters Internet Group ----- Original Message ----- From: "David Veatch" <htm...@dv...> To: <htm...@li...> Sent: Wednesday, August 14, 2002 12:38 PM Subject: [htmltmpl] Nesting Templates | Greetings all, | | Sending again, b/c it was sent accidentally from the wrong address... | I'm brand new to HTML::Template. I just found it last week, and am so | far very impressed. I was somewhat daunted by the idea of building my | own tag-replacement scheme, for reasons of both difficulty and (mainly) | time. H::T so far has been the answer to all my needs. | | I do have a question though... I've a problem, for which the solution | (at least the obvious solution) is nested templates, but haven't found a | way to do it w/o running through $template->output twice... which is one | more than I want to. | | In several templates, I use the same block of HTML which contains | several tmpl_vars. It would be ideal to be able to assign that block of | markup to a tmpl_var, and have both the parent, and the child template | parsed in one go. I was hoping to find an option like max_nesting that | would behave as max_includes does... in order to minimize the chance of | endless loops. I'm using scalarref and arrayref templates, btw, yanked | from a database, Apache 1.3.26, mod_perl 1.27, and H::T 2.5. | | My apologies if this has been covered before, I searched the archives | and didn't find anything, though it could have been for lack of the | right search terms. It may not even be a good idea for reasons I've yet | to see... but it never hurts to ask. Is there a way to do what I'm | talking about? Maybe H::T::Expr? I haven't looked there yet. | | Thanks in advance. | | ] David Veatch | ] dv...@dv... | ] http://dvicci.com/ | | | | ------------------------------------------------------- | This sf.net email is sponsored by: Dice - The leading online job board | for high-tech professionals. Search and apply for tech jobs today! | http://seeker.dice.com/seeker.epl?rel_code=31 | _______________________________________________ | Html-template-users mailing list | Htm...@li... | https://lists.sourceforge.net/lists/listinfo/html-template-users | |
From: David V. <htm...@dv...> - 2002-08-14 19:38:06
|
Greetings all, Sending again, b/c it was sent accidentally from the wrong address... I'm brand new to HTML::Template. I just found it last week, and am so far very impressed. I was somewhat daunted by the idea of building my own tag-replacement scheme, for reasons of both difficulty and (mainly) time. H::T so far has been the answer to all my needs. I do have a question though... I've a problem, for which the solution (at least the obvious solution) is nested templates, but haven't found a way to do it w/o running through $template->output twice... which is one more than I want to. In several templates, I use the same block of HTML which contains several tmpl_vars. It would be ideal to be able to assign that block of markup to a tmpl_var, and have both the parent, and the child template parsed in one go. I was hoping to find an option like max_nesting that would behave as max_includes does... in order to minimize the chance of endless loops. I'm using scalarref and arrayref templates, btw, yanked from a database, Apache 1.3.26, mod_perl 1.27, and H::T 2.5. My apologies if this has been covered before, I searched the archives and didn't find anything, though it could have been for lack of the right search terms. It may not even be a good idea for reasons I've yet to see... but it never hurts to ask. Is there a way to do what I'm talking about? Maybe H::T::Expr? I haven't looked there yet. Thanks in advance. ] David Veatch ] dv...@dv... ] http://dvicci.com/ |
From: Jody B. <big...@ya...> - 2002-08-14 18:28:06
|
Hey Sam - why don't you sign up as an Amazon affiliate or something so we can at least pass a buck or two along to you with our purchase? looking forward to the book - jody biggs --- Sam Tregar <sa...@tr...> wrote: > Hello all. My first book, Writing Perl Modules for CPAN, was just > released. This book was motivated largely by my experiences writing > HTML::Template and running this mailing-list. I've had a great time > writing modules for CPAN and I hope I can help others join the fun. > > If you're interested in finding out what I've been doing for the last > year, instead of working on HTML::Template 3.0, this is your chance! > Also, if you're not yet familiar with CGI::Application, the last > chapter > of the book is a complete introduction to a great module that > supports > HTML::Template. > > For more information, including a free download of the first chapter: > > http://apress.com/book/bookDisplay.html?bID=14 > > And to buy it at a reasonable price: > > > http://www.amazon.com/exec/obidos/ASIN/159059018X/002-5718448-5632815 > > > http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=159059018X > > Thanks, > -sam > > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: Dice - The leading online job > board > for high-tech professionals. Search and apply for tech jobs today! > http://seeker.dice.com/seeker.epl?rel_code=31 > _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com |