Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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 examining the Monastery: (5)
As of 2015-11-28 18:34 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (743 votes), past polls