On Wed, Oct 17, 2001 at 02:59:43PM -0500, Boex,Matthew W. wrote:

>i still have a couple questions.  first, i have only used staroffice to put
>together web pages.  when i load a template with template tags, star office
>changes the template tags.  is there an editor out there for linux that
>won't do this.

I think that most of us use plain-text editors for HTML template
editing. (Personally, I like vi...) You might try nedit, which has
syntax highlighting for HTML but won't mess about with the content.

>second, i am still a little fuzzy on the associate option.

I think I mostly answered this in my message
<[EMAIL PROTECTED]> (Re: [htmltmpl] question of 5
October, 21:49:04 +0100).

>i have a bunch
>of hidden tags i want to print out.  here is how i do it with cgi -
>
>foreach my $param ($q->param()) {
>  print $q->hidden(-name=>"$param")  if ($q->param ne 'page');
>}
>
>what would be the syntax, using the associate option, to send a hidden param
>to my HTML::Template?  is this correct ??? is there a better way?? 

Yes, use associate:

my $query = new CGI;
my $template = HTML::Template->new(filename => 'template.tmpl',
                                   associate => $query);

realising that you will need, in the template and within the form, a

<input type=hidden name=FOO value="<TMPL_VAR NAME=FOO>">

where FOO is each variable you want to push into the template.

HTML::Template is _not_ used to generate HTML in the way that CGI.pm can
be. (My own opinion is that CGI.pm _shouldn't_ have this functionality,
but that's another story.)

Roger

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to