Sorry, I am a fool.  I found the methods in the VMethods section of the tt
website.  Sorry.
I have used:
     name.0.remove('.*\.')
to sort the problem

On Jan 9, 2008 4:13 PM, perlmunky <[EMAIL PROTECTED]> wrote:

> Hi list,
>
> I am trying to generate a web page containing a form which is constructed
> automagically with catalyst.
> The variable which is passed to the template is an array (  [%
> column_names %]  )
>
> each element in the array looks like:
>    foo.bar
>    foo.baz
>    oof.rab
>    oof.zab
> ...
>
> As I loop over the array I would like to split the 'foo.baz' into  'foo'
> and 'baz' and keep 'foo.baz'
> My current code looks like this:
>
> <table id="well_summary_query" class="report_table">
>     <tr>
>      <td>
>          <select name="conditional_type" >
>            <option value="no_conditional"></option>
>             <option value="where">where</option>
>         </select>
>          <select name="select_column_name">
>              [% FOR name IN column_names %]
>                 <option value="[% name.0 %]">[% name.0 %]</option>
>              [% END %]
>         </select>
>
>         <select name="case_option">
>             [% FOR qual IN qual_options %]
>                 <option value="[% qual %]">[% qual %]</option>
>             [% END %]
>         </select>
>         <input type="text" name="user_text" value="" />
>      </td>
>     </tr>
> </table>
>
> Basically, I would like to display the option value as baz, but have the
> full name in the post.
> How on earth can this be done in the template.
>
> The way I have considered doing this is to duplicate arrays - however the
> template toolkit seems to be without for (my $i = 0 ... )
>
> Sorry if this is (yet another) stupid question.
>
>

Reply via email to