Re: [Templates] Accessing template variables after process

2012-06-20 Thread Clayton Scott
On Wed, Jun 20, 2012 at 4:31 AM, Daniel Degenhardt wrote: > Thanks for the really quick response. > > Still it seems that I'm missing something essential. If I do it the way > you explained, I always get the unmodified values: > > [% name="John" %] > > in the template still results in printing "Fr

Re: [Templates] Is there a way to access an array of hashes

2010-11-02 Thread Clayton Scott
#x27;d expect This is because of the hash dumping it's keys and values into the array, and is why you need a hash reference instead. Clayton -- Clayton Scott clayton.sc...@gmail.com ___ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates

Re: [Templates] Document Processing

2010-04-01 Thread Clayton Scott
ing to the documentation you can do this: my $processedDocument; $tt->process('templatefile.tpl', {myvar => 'var'}, \$processedDocument); # $processedDocument now has the results. HTH, Clayton -- Clayton Scott clayton.sc...@gmail.com

Re: [Templates] Argh!! Concat and array, errors! - emergency

2010-02-24 Thread Clayton Scott
How about simplifying your second approach with an intermediate variable? [% item_two= $pageItems.section.${color}.type; someArray = ["Item1","item2: $item_two","color"] %] Clayton -- Clayton Scott clayton.sc...@gmail.com ___ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates

Re: [Templates] Assignment based on value

2009-05-11 Thread Clayton Scott
On Mon, May 11, 2009 at 2:20 PM, Mark Wormgoor wrote: > > > Is there any reason the folowing doesn't work? > [% a > 0 ? SET b=1 : SET b=0 %] I think the ternary operator only takes very simple expressions. Try this instead: [% SET b = a > 0 ? 1 : 0 %] or drop the SET which isn't really n

Re: [Templates] Bug? Feature? filter not applied when SET is present

2009-03-21 Thread Clayton Scott
xactly the same with or without a SET. http://tt2.org/docs/manual/Directives.html#section_SET Clayton -- Clayton Scott clayton.sc...@gmail.com ___ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates

[Templates] Bug? Feature? filter not applied when SET is present

2009-03-19 Thread Clayton Scott
[% SET cap = 'capitalised' | upper %] [% cap %] vs [% cap = 'capitalised' | upper %] [% cap %] -- Clayton Scott clayton.sc...@gmail.com ___ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.

Re: [Templates] lib file PROCESS not parsed

2009-03-09 Thread Clayton Scott
r -%] > [% PROCESS event -%] > [% PROCESS terms %] > [% PROCESS provider %] Do you have a variable named voucher in your args to TT or defined in the header or profile templates? Recently bitten by that very issue, Clayton -- Clayton Scott clayton.sc...@gmail.com

Re: [Templates] Findng Errors in Template files

2008-01-10 Thread Clayton Scott
g his templates for check for template syntax errors, essentially the equivalent of perl -c perlfile for perl syntax errors. -- Clayton Scott [EMAIL PROTECTED] ___ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates

Re: [Templates] Question about this list

2007-04-24 Thread Clayton Scott
pment of TT are discussed here. Clayton -- Clayton Scott [EMAIL PROTECTED] ___ templates mailing list templates@template-toolkit.org http://lists.template-toolkit.org/mailman/listinfo/templates

Re: [Templates] Is there a way to search the list?

2007-04-24 Thread Clayton Scott
As for searching the list it's kludgy but I use google like so: windows site:template-toolkit.org That will include the mailing list archives. Clayton -- Clayton Scott [EMAIL PROTECTED] On 4/23/07, Jonathan Polacheck <[EMAIL PROTECTED]> wrote: I'm trying to install Templa

Re: [Templates] Converting from old template language which allows nested tags into TT template

2006-10-20 Thread Clayton Scott
On 10/20/06, Bill Ward <[EMAIL PROTECTED]> wrote: On 10/20/06, Clayton Scott <[EMAIL PROTECTED]> wrote: Well, if the TT decision to use _ was based on Perl 6 I think it's relevant. The Perl 6 concat operator decision and discussion was over 4 years ago: http://www.nn

Re: [Templates] Converting from old template language which allows nested tags into TT template

2006-10-20 Thread Clayton Scott
On 10/20/06, Buddy Burden <[EMAIL PROTECTED]> wrote: Mark, > I chatted with Allison Randal at OSCON shortly after this decision was > made (because I liked the _). IIRC, she said that the desire for > orthogonality in Parrot influenced the decision to switch. Well, obviously I'm no expert, but

Re: [Templates] Assembling a list of css/js/meta tags for WRAPPERs

2006-08-10 Thread Clayton Scott
nd I wanted to load the javascript in a specific order. The "Cascading" part of CSS makes ordering highly desirable. C -- Clayton Scott [EMAIL PROTECTED] ___ templates mailing list templates@template-toolkit.org http://lists.template-tool

Re: [Templates] CHOMP feature request

2006-02-13 Thread Clayton Scott
> If this is unacceptable, putting the space back in can be accommodated - but > again I think this is more consistent. > > Paul Seamons > [EMAIL PROTECTED] > > ___________ > templates mailing list > templates@template-toolkit.org >

Re: [Templates] Proposed changes to list.hash and hash.list vmethods

2006-01-27 Thread Clayton Scott
ig::General needs a ForceArray analogue to the one in XML::Simple. Clayton -- Clayton Scott [EMAIL PROTECTED] ___ templates mailing list templates@template-toolkit.org http://lists.template-toolkit.org/mailman/listinfo/templates

Re: [Templates] Gettext support in TT

2006-01-03 Thread Clayton Scott
or those who are not aware, GNU Gettext is a localization (translation) > tool. Try taking a peek at Catalyst::Plugin::I18N http://search.cpan.org/dist/Catalyst-Plugin-I18N/ It povides a decent demonstration of how to do localization with TT and mo/po files eventhough it may have a few depend

Re: [Templates] Distributing TT templates on CPAN?

2005-12-20 Thread Clayton Scott
On 12/20/05, Andy Wardley <[EMAIL PROTECTED]> wrote: > Clayton Scott wrote: > > Is there a way to package templates as plugins? > > The easiest way I can think of off the top of my head is to use the > define_block() context method and hard-code your templates as strings.

[Templates] Distributing TT templates on CPAN?

2005-12-20 Thread Clayton Scott
Os or BLOCKS might be involved) for general use/sharing? Is there a way to package templates as plugins? -- Clayton Scott [EMAIL PROTECTED] ___ templates mailing list templates@template-toolkit.org http://lists.template-toolkit.org/mailman/listinfo/templates

Re: [Templates] No Such pseudo-hash??

2005-10-15 Thread Clayton Scott
ss->process('addresses.tt', [EMAIL PROTECTED], $tt2_addressesExportFile)    or die $tt2_address->error;   I'm still going through the docs, and am now reading the Badgerbook.Mark_______templates mailing list templates@template-toolkit.orghttp://lists.template-toolkit.org/mailman/listinfo/templates -- -- Clayton Scott[EMAIL PROTECTED]