Re: [Templates] A bug and a suggestion

2008-01-23 Thread Kelly Thompson
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

Re: [Templates] Good examples... Bad examples.

2008-03-05 Thread Kelly Thompson
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

Re: [Templates] filter out items in a FOREACH loop (bugzilla template)

2008-04-14 Thread Kelly Thompson
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

[Templates] Hello all

2008-05-18 Thread Kelly Thompson
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

[Templates] Fwd: Hello all

2008-05-18 Thread Kelly Thompson
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

Re: [Templates] Hello all

2008-05-19 Thread Kelly Thompson
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

[Templates] Table plug in

2008-08-28 Thread Kelly Thompson
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

Re: [Templates] Table plug in

2008-08-28 Thread Kelly Thompson
;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

Re: [Templates] Table plug in

2008-08-28 Thread Kelly Thompson
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

Re: [Templates] Commonly used file extensions for Template Toolkit

2008-09-15 Thread Kelly Thompson
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

Re: [Templates] syntax problems with Template::DBI

2008-11-12 Thread Kelly Thompson
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

Re: [Templates] Tests for defined nested hash

2008-11-13 Thread Kelly Thompson
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') &

Re: [Templates] Date Plugin

2009-01-23 Thread Kelly Thompson
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

Re: [Templates] Date Plugin

2009-01-23 Thread Kelly Thompson
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. > >

Re: [Templates] The ghost of templates future

2009-02-16 Thread Kelly Thompson
> 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

[Templates] Captchas

2009-02-16 Thread Kelly Thompson
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

Re: [Templates] Captchas

2009-02-17 Thread Kelly Thompson
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

Re: [Templates] Truncate that preserves HTML tags ?

2009-04-10 Thread Kelly Thompson
> > [% 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. > > ___

Re: [Templates] Truncate that preserves HTML tags ?

2009-04-10 Thread Kelly Thompson
> 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:/

[Templates] Adding variables numerically.

2009-04-11 Thread Kelly Thompson
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

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

2010-02-24 Thread Kelly Thompson
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"] %] > > > > > __

Re: [Templates] CGI example

2012-02-18 Thread Kelly Thompson
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