Re: [htmltmpl] Writting a Test::More for HTML::Template

2009-07-07 Thread Jason Purdy
I've heard good things about HTML::Template::Dumper: http://search.cpan.org/~tmurray/HTML-Template-Dumper-0.1/lib/HTML/Template/Dumper.pm - Jason Matias Alejo Garcia wrote: > > Hello, > > I am writing some tests for a web site. I would like to check that all > parameters in a given template h

Re: [htmltmpl] dynamic

2007-11-02 Thread Jason Purdy
The way I would do it is make two templates. Instead of the tmpl_include, you would have something like Then in your code, you would create a 'fragment' template object based on the myDir/my.tmpl and then pass that template object output() into your parent template as the 'subcontent' parame

[htmltmpl] Feature Idea [TMPL_VIRTUAL]

2007-04-02 Thread Jason Purdy
How about a new tag, either as part of the standard distribution or a plugin: TMPL_VIRTUAL The one thing that I like when I'm doing PHP pages is that I can build singular dynamic components and simply include them from the parent template. i.e. # FILE: index.php # FILE: helloworld.php Y

Re: [htmltmpl] Images with height/width of 90/120???

2006-02-16 Thread Jason Purdy
I'm not seeing it: $ perl ./test.pl Content-type: text/html My guess is that your browser is cleaning up after you? Try putting quote marks around the numbers. - Jason --- This SF.net email is sponsored by: Splunk Inc. Do you grep t

Re: [htmltmpl] Pre-filled input fields

2005-10-28 Thread Jason Purdy
What I usually do is add another step and instead of stopping at the template, I pass the template's output into HTML::FillInForm, which is great for filling out ANY input fields (pop-up menus, etc). - Jason Arkady Grudzinsky wrote: What is the best way to generate input fields pre-filled wit

Re: [htmltmpl] Bug in die_on_bad_params handling

2005-07-07 Thread Jason Purdy
IMVHO, this isn't a bug, but rather the intended behavior. If you really want to be strict about it, set up two different loops. Otherwise, don't worry about die_on_bad_params. - Jason Matija Grabnar wrote: For example Template: Script: #!/usr/bin/perl use HTML::Template; $t=HTML

[htmltmpl] 2 New(?) Ideas

2004-12-03 Thread Jason Purdy
While I'm thinking about this, what do you guys think about these? 1) Class::DBI Integration I'm just starting to pick up CDBI (I know, I'm late to the party ;)) and it's kind of frustrating to get the data into the template. Or it could be made easier. I'm not sure if we're talking Plugin or a

Re: [htmltmpl] Static TMPL_INCLUDE not working

2004-11-22 Thread Jason Purdy
Kasturirangan Rangaswamy wrote: Index.tmpl --- I think the problem is this line ... try this instead: Cheers, Jason --- SF email is sponsored by - The IT Product Guide Read hone

Re: [htmltmpl] print several vars in one loop

2004-09-23 Thread Jason Purdy
What I've done in the past, where I need to have more than two in a row is to create a nested loop, where the outer loop is the rows and the inner loop is the 3 (or N != 2) records you want to display. Code Example (in the cgiapp): # Need to divide into sixths for Rosie's design... my $count = 0

Re: [htmltmpl] Select/option How to set "selected"?

2004-05-03 Thread Jason Purdy
Hi Mark, How are you determining which option to pre-select? It might be better to use HTML::FillInForm. Other than that, here's what you would do if you want to re-invent the wheel: ### In your programming code ### my $template = HTML::Template->new( 'filename' => 'file.TMPL' ); my $occloop_

Re: [htmltmpl] Select/option How to set "selected"?

2004-05-03 Thread Jason Purdy
That said, my philosophy is to dump as much work on the database as possible. Why? -- because db programs have been developed over years and years (not that Perl has not been, but your or my code may not have the same advantage), db servers are typically fast machines, db software have been ho

Re: [htmltmpl] Radio button question

2004-02-11 Thread Jason Purdy
"> "> But the above is really ugly, and I gotta believe there's a better approach (that I'm too dense to recognize) Yeah, I know, it seems like there should be a better solution. In fact, due to the limitations of HTML, there are only a series of equally sucky solutions. What you have above i

Re: [htmltmpl] Dynamically including templates?

2004-01-07 Thread Jason Purdy
My guess is that it's trying to do the INCLUDE *BEFORE* doing the variable substitution. So if you're stuck on making the included file dynamic, I would recommend a two-sweep approach, which I see Timm Murray's post addresses. Cheers, Jason Todd Chapman wrote: I would like to pass a paramete

Re: [htmltmpl] Using HT to create HTML Email

2004-01-07 Thread Jason Purdy
Chris Faust wrote: Looking at the docs - would the below work? my $email_message = HTML::Template->new( filehandle => *FH, some_loop => [EMAIL PROTECTED], some_val =>$someval, some_if=>1, ); &send_email($email_message); That would certa

[htmltmpl] cache-ing question

2003-02-13 Thread Jason Purdy
I have a mod_perl/CGI::Application program that I've written that populates a HTML::Template with a list of files that are on the server. The program also varies the list based on the query string (/list?c=magazines ... /list?c=agents ... etc). I'd like to cache that list, based on the URL, so th