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
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
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
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
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
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
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
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
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
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_
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
">
">
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
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
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
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
15 matches
Mail list logo