I second Mark's suggestion to switch to an errors
hash, but i just wanted to point out that you can
use Perl to change those fields for you:
perl -pi.bak -e's/\[% (first_name_error) %\]/[%
$1 | eval %]/g' *.tt
worked for me, but you should test it out before
you unleash it upon your files.
jeffa
--- "Cahill, Earl" <earl-yJQK5p0oZSNBDgjK7y7TUQ@xxxxxxxxxxxxxxxx> wrote:
> Sorry, should have mentioned that I was hoping
> to be able to do it without
> an eval :) Just have a lot of fields I would
> have to change. That said, I
> can go through and make the changes if needs
> be.
>
> Thanks,
> Earl
>
> > -----Original Message-----
> > From: darren chamberlain
> [mailto:dlc-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx]
> > Sent: Friday, December 19, 2003 3:57 PM
> > To: templates-MnLy+PD7ppGDO3lXZvfOKmD2FQJk+8+b@xxxxxxxxxxxxxxxx
> > Subject: Re: [Templates] recursion in
> templates
> >
> >
> > * Cahill, Earl <earl at aboutws.com>
> [2003/12/19 17:45]:
> > > Hi,
> >
> > Hello.
> >
> > > I really did try to find an answer, but
> let's say I have something
> > > like this
> > >
> > > my $form = {
> > > first_name_error => "[%
> first_name_required_error %]",
> > > first_name_required_error => "Your first
> name is required",
> > > };
> > >
> > > then in my template I have
> > >
> > > [% first_name_error %]
> >
> > Use the eval filter:
> >
> > [% first_name_error | eval %]
> >
> > (darren)
> >
> > --
> > I invented the term "Object-Oriented", and I
> can tell you, I didn't
> > have C++ in mind.
> > -- Alan Kay
> >
>
> _______________________________________________
> templates mailing list
> templates-MnLy+PD7ppGDO3lXZvfOKmD2FQJk+8+b@xxxxxxxxxxxxxxxx
>
http://lists.template-toolkit.org/mailman/listinfo/templates
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|