Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Re: Nirvana through the templating yin yang (TT2 /

by thraxil (Prior)
on Jun 18, 2003 at 15:37 UTC( #266862=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    my $query = new CGI;
    my $template = HTML::Template->new(filename => 'template.tmpl',
                                       associate => $query);
  2. or download this
    sub selectify {
        my $values = shift;
        } @{$values}];
  3. or download this
    $template->param(some_loop => selectify(\@values,\@labels,[$query->par
  4. or download this
    <select name="some_param">
    <tmpl_loop name="some_loop">
      <tmpl_include name="inner_loop.tmpl">
  5. or download this
    <option value="<tmpl_var name="value" escape="html">"<tmpl_if name="se
    +lected"> selected="selected"</tmpl_if>><tmpl_var name="label" escape=

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://266862]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2016-08-30 00:41 GMT
Find Nodes?
    Voting Booth?
    The best thing I ever won in a lottery was:

    Results (410 votes). Check out past polls.