I concur.
Other than that, I lOVE TT. Really.
One more thing, you mentioned in the badger book, about creating your own
virtual methods, but you didn't show how to "use" them.
For instance, I wanted to add substr to a formating issue I had.
use Template::Stash;
$Template::Stash::LIST_OPS->{get
Yes I would have to agree. Purchase the Badger Book.
Andy has written an excellent section on creating site mapping.
Although a little hard to wrap your head around at first, VERY streamlined
and efficient once you do.
As well as MANY other great examples!
On Wed, Mar 5, 2008 at 12:43 PM, She
I have used the same scenario.
I have found that "sometimes" you CAN access a perl variable, via the
template by appending the dollar sign and sending it in the vars hash. It
will be available to the Template::Provider and Template::Grammer mods. (I
think, help me out Andy)
Like so:
in perl script
I am trying to create a MACRO that will replace a lot of values within a
databased variable.
What I have now is this in my "config" template.
[% MACRO unescape(text)
text.replace('\r', '');
text.replace('{b}', '');
text.replace('{/b}', '');
%]
Then in my "view" template I have:
[% FOREACH
Sorry about the typo.
I think it was kinda important.
Here's is the corrected version of the error message:
"Unexpected end of directive in config template line 1-5."
-- Forwarded message ------
From: Kelly Thompson <[EMAIL PROTECTED]>
Date: Sun, May 18, 200
italic, underline, and hyperlink. No other HTML will be
"translated". Javascript, perl, and TT ROCK!!
Thanks guys!!
On Mon, May 19, 2008 at 12:02 PM, Larry Leszczynski <[EMAIL PROTECTED]>
wrote:
> Hi Kelly -
>
> On Sun, 18 May 2008, Kelly Thompson wrote:
>
> I
I am pretty new to TT and attempting to create a dynamic table with the
"Table" plug in to display the results of a database query.
I send the result set to the template as an array reference called "news",
then I would like to display the news articles in a table with 4 cols, and
however many row
;news.size" of 9 (or 8 actually, including
0) I get:
1 4 7 null
2 5 8 null
3 6 9 null
Just blank data in those cells. All the other structure is in tact, but the
template variables are all null.
HUMM
On Thu, Aug 28, 2008 at 1:02 PM, Josh Rosenbaum <[EMAIL PROTECTED]> wro
sh Rosenbaum <[EMAIL PROTECTED]> wrote:
> Kelly Thompson wrote:
>
>> Thanks Josh!!
>> I made those changes and it is more adherent to standards.
>>
>> Now I just need to figure out how to arrange the data across.
>>
>> It is still going down ie:
>>
&g
How about this one.
What extension does TT use as it's default output extension?
Why can't I get server side includes to work?
Is there a way to use TT to create dynamic documents with shtml extension?
On Mon, Sep 15, 2008 at 2:15 PM, Andrew Marold <[EMAIL PROTECTED]> wrote:
> I mostly use .t
I suggest you move the DBI interaction into the perl, script.
Just a thought...
On Wed, Nov 12, 2008 at 2:18 PM, Andy Wardley <[EMAIL PROTECTED]> wrote:
> Josh Rosenbaum wrote:
> > My guess is that the execute() routine does not handle an arrayref being
> passed
>
> Your guess would be correct
I think I remember something from the Perl book.
for my $key (keys %hash){
while(ref $_ eq HASH){
do stuff...
}
}
On Thu, Nov 13, 2008 at 3:42 PM, Josh Rosenbaum <[EMAIL PROTECTED]> wrote:
> Todd Rinaldo wrote:
> > What we discovered we need to do is this
> > defined fee && fee.defined('fi') &
I have had to do this so often, I created a simple little sub that I pass to
the template.
sub fixDate {
my $class = shift;
my @it = split(/-/, shift);
my @ti = split(/ /,$it[2]);
my @time = split(/:/, $ti[1]);
my $suffix = 'am';
if($time[0] > 12){
$time[0] -= 12;
$suffix = 'pm';
}
elsif($time
I should mention, I have the sub in another package, you can take the "my
$class = shift;" off, if you don't.
On Fri, Jan 23, 2009 at 7:33 AM, Kelly Thompson wrote:
> I have had to do this so often, I created a simple little sub that I pass
> to the template.
>
>
> find such a directive.
>
> Is there a way to get this behavior?
>
> Thanks,
> Sean
>
>
>
>
>
>
>
> ___
> templates mailing list
> templates@template-toolkit.org
> http://mail.template-toolkit.o
there is a
question that hasn't been answered by the Author for over a year.
Calling on the wisdom of giants!! = )
I'm fairly new to this...
--
Kelly Thompson
Vice President
Live Audio Magazine Inc.
www.liveaudiomag.com
(919) 389-5784
___
te
h the cost and
> > benefit to see what the right balance is.
>
> I meant to say not ALWAYS really necessary :)
>
> ___
> templates mailing list
> templates@template-toolkit.org
> http://mail.template-toolkit.org/mai
>
> [% FILTER truncate(10, '...') %]
>[% foo | html %]
> [% END%]
>
> => the isn't closed anymore.
>
> Is there a function that would allow to do that ? Or an easy way to do so ?
>
> Thanks!
>
> Leo.
>
> ___
> Is there a function that would allow to do that ? Or an easy way to
> > do so ?
> >
> > Thanks!
> >
> > Leo.
> > ___
> > templates mailing list
> > templates@template-toolkit.org
> > http:/
s.0 -1";
To no avail!!
I either get: unexpected token (-1)
Or the date with -1 added to the end, or even sometimes with the last part
missing.
I know I am putting too much in the template, I should probably move all
this into the script, b
mplex and
> I then get errors when I try to do something like:
>
> "item2: $pageItems.section.${color}.type"
>
> Any suggestsions on make this work?
> [% someArray = ["Item1","item2: " _ pageItems.section,"color"] %]
>
>
>
>
> __
Have you, (or anyone here) tried Catalyst? I hear good things but don't
know anyone who has personally used it.
On Feb 18, 2012 10:24 AM, "Dave Cross" wrote:
> On 02/17/2012 11:11 PM, Bill McCormick wrote:
>
>> However, looking at the perldoc for Class::DBI, it seems like it will
>> be very usefu
22 matches
Mail list logo