ame => $test_tmpl);
>
> print "Content-type: text/html\n\n";
> print $template->output;
>
>
> test.tmpl
> ----
>
>
>
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mai
It'd be more helpful if you could include the code + template that you used.
On 16/02/06, David Murchie <[EMAIL PROTECTED]> wrote:
>
>
> I can't believe this is really happening but it appears that any img
> embedded in my html template that has dimensions of 120w x 90h is "dropped"
> from the te
If you make sure
die_on_bad_params => 1
is set in your HTML::Template constructor, then any variable which
isn't set in the template, or is misspelt will cause the page to die -
the designer can then tell what's wrong by simply looking at the error
message.
Carl
On 02/12/05, Boon Chew <[EMAIL PR
> e.g.
>
>
>
a TMPL_LOOP doesn't take a hash, it takes an array-ref of hash-refs
that would be
my @loop = (
{name => 'a'},
{name => 'b'},
);
$tmpl->param( students => [EMAIL PROTECTED] );
If you knew that already, give an example of what sort of data you
want to put in, and what you want
On 07/11/05, Rakhi Verma <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I am facing some problem with the output of TMPL_VAR VALUE when
> the VALUE text contains space charater e.g "abc efg".
> When the template is output the is not replaced with the VALUE
> text i have specified.
> Only the value
You can't change a tempate according the the_value_ of a variable,
however you could change your hash structure from
hash1=>{
type =>"text",
...
},
hash2=>{
type=>"dropdown",
...
}
To something more like
hash1=>{
text => 1,
...
},
hash2=>{
dropdown => 1,
...
}
And then in the te
On 18/10/05, Philip Tellis <[EMAIL PROTECTED]> wrote:
> Oh well, "Perl is designed to make the easy jobs easy, without making
> the hard jobs impossible."
>
> I'd hoped that it was also, "... make impossible jobs pretty hard"
touché :)
A new option to allow HTML::Template to load up HTML::Parser
On 18/10/05, Philip Tellis <[EMAIL PROTECTED]> wrote:
> I want both to be on by
> default.
There can only be 1 _default_, by definition
> It makes sense therefore to do this:
>
> html_escape => 1, js_escape => 1, foo_escape => 0
> Of course, it's pretty hard to figure out which TMPL_VARs need to
Well, it was more of a mental list, but here's what I asked of my last
host before going with them.
Does the size of the mysql database count towards the normal diskspace
allowance? If not, is there a max size for the database?
Is spam-assassin installed/supported?
fastCGI?
Is it possible to up
Arka,
Going back through the murky mists of my memories, several years ago
to my first encouter with CGI, I came across a IE - apache specific
problem.
It was a perl CGI running on apache with SSL. Occasionally, but not
every time, there was an error message which only occured with IE.
I didn't k
Micheal,
You've got the right idea there, that's generally how it's done and
yes, it's a bit of a pain.
One other option is to fill the template without the form selections,
then use HTML::FillInForm to set the form parameters.
Another option if you're just dealing with date / time select menus
Hi Brad,
You don't need to create an explicit "top of page" anchor.
Use the implicit top link and it'll do what you want.
Carl
>>> Brad Cathey <[EMAIL PROTECTED]> 01/12/2004 16:17:18 >>>
Hello all,
I have placed a simple anchor (bookm at the top and "Top of Page" link at
the bottom of a .tmpl
Sharad,
The paths to your image files (and css, js, etc) are relative to the
CGI script. The folder that the .tmpl file is in is irrelevant.
Also filesystem paths are irrelevant: it's the website paths you need
to know.
e.g. if the CGI is at "/cgi-bin/sample/display.pl"
Then the image files must
{
my $tmpl = HTML::Template->new (filehandle => *DATA);
$tmpl->param(bar => 'works');
print $tmpl->output;
}
1;
__DATA__
foo
baz
-
Carl
>>> ken <[EMAIL PROTECTED]> 04/10/2004 11:43:16 >>>
Carl Franks wrote:
>
> >>> <
>>> <[EMAIL PROTECTED]> 02/10/2004 23:41:36 >>>
>
>Anyone ideas on what is going on? Any suggestions welcome.
>
>Thanks in advance,
>-Ken
Hi Ken,
Try this instead (below), noticed that I pass the DATA fileglob (*DATA)
directly to HTML::Template->new
Carl
#!/usr/bin/perl
use strict;
use warnin
sterday that it would probably be best somewhere
under HTML::
I'm toying with HTML::Menu::DateTime
I'm also currently adding examples for Template::Toolkit to the POD.
Thanks,
Carl Franks
---
This SF.Net email is sponsored by: YOU BE THE
er line by switching
on 'loop_context_vars' and doing something like,
or to create a table with 2 columns
TMPL_UNLESS>
Carl Franks
---
This SF.Net email is sponsored by: YOU BE
pp that I'll be releasing soon.
Many thanks,
Carl Franks
=head1 NAME
HTML::Template::Dropdown::Date
=head1 SYNOPSIS
use HTML::Template::Dropdown::Date;
my $menu = HTML::Template::Dropdown::Date->new (
date => '2004-02-26',
noSelect => 1,
emptyFirst
An alternative that I use:
In the template file, use a simple VAR tag,
Store all the different language's text in a database or text files.
In the CGI, load the appropriate language based on input parameters or
cookie value,
my $lang = $cgi->param('lang') || 'en';
my $gui = load_gui ($lang);
T
>
>
>
>This works well if you are using an (X)HTML editor that
>specifically recognized HTML and nothing else. This will just
>tell it to skip over you TMPL_VAR tags. Would also be better if
>you put your templates through some kind of validation before
>using them.
Of course, it only works w
Yeah, that's why I said "probably": I knew there'd be something I'd
missed or didn't know about.
"There's More Than One Way To Do It"
Cheers,
Carl
>>> Sam Tregar <[EMAIL PROTECTED]> 03/08/2004 04:25:45 >>>
On Mon, 2 Aug 2004,
to change environment variables,
in which case you could use the 'use lib' command, eg:
use lib "/home/dan/lib";
Hope this helps,
Carl
Carl Franks
Web Developer
Computer And Media Services
Level 8 Ninewells Hospital
Faculty of Medicine, Dentistry & Nursing
University of Dundee
> I think I'd write that:
>
> use Storable qw(freeze);
> $cache = freeze($t);
>
> HTML::Template works fine with Storable - that's how the file_cache
> and shared_cache work.
>
> -sam
>
That didn't even cross my mind! I think that's exactly what I'll do.
The code I had written used Storab
One way to do it might be:
use strict;
use Data::Dumper;
my $cols = 3;
my @foo = ({one => 1, ein => 1},{two => 2, zwei => 2},
{three => 3, drei => 3}, {four => 4, vier => 4});
my @bar;
for (my $n=0; $n<=$#foo; $n+=$cols) {
my @row;
for (1..$cols) {
push @row, $foo[$n+($_
Hi all,
I've coded and tested a new feature for the 'new' and 'output' methods
and would like people's feedback on whether it might be accepted.
This feature request allows a parsed template structure to be output
as a scalar ref, which can be fed back to the new method again.
Effectively this
te::Dropdown::Date->new
( date => '2004-04-01',
lessYears => 2,
plusYears => 0 );
$template->param (startDay => $start->dayMenu());
print header(),
$template->output();
###
Thanks,
Carl Franks
---
SF
>Die E-Mail-Adresse <[EMAIL PROTECTED]> an die Sie eine Mail geschickt haben,
>hat sich geändert. Bitte benutzen Sie zukünftig <[EMAIL PROTECTED]>
>statt <[EMAIL PROTECTED]>. Die von Ihnen gesendete Mail wurde an den
>richtigen Empfänger weitergeleitet.
The email address you sent to <[EMAIL PROT
27 matches
Mail list logo