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
#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
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
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
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
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
[% 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.
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
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
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
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
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
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
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
> 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
>
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
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
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.
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
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]
20 matches
Mail list logo