Re: [Templates] Dependency:

2017-04-17 Thread Dave Cross
On Fri, Apr 14, 2017 at 9:27 PM, Sherwood Botsford wrote: [ snip ] > I figured that if I added this: > > ttree -f .ttreerc --depend *.html=header.inc > > that it would do the Right Thing. There are two problems here. Firstly, ttree only supports a single asterisk on the right-hand side of a de

Re: [Templates] why this substitution is not working?

2014-08-15 Thread Dave Cross
On 15/08/14 19:22, Rajeev Prasad wrote: calling script code snippet: $vars = { userl => $userid }; my $tt = Template->new(); $tt->process($vars)|| die $tt->error(); the template [% IF userl == 'ABC' %] [% INCLUDE myfile.ABC %] [% ELSIF userl == 'DEF' %] [%

Re: [Templates] CGI example

2012-02-18 Thread Dave Cross
On 02/18/2012 07:24 PM, Kelly Thompson wrote: Have you, (or anyone here) tried Catalyst? I hear good things but don't know anyone who has personally used it. Yes, I've used Catalyst. In my opinion if you want to build a web application in Perl then Catalyst is the best option. But I'm also qui

Re: [Templates] CGI example

2012-02-18 Thread Dave Cross
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 useful. Class::DBI hasn't been maintained for over four years. I really wouldn't recommend using it for new development these days. Most people seem to have transferred

Re: [Templates] information

2011-10-31 Thread Dave Cross
On 10/31/2011 08:06 AM, veeru reddy wrote: > Hi, > I need some information. where can i ask questions because I have > small question regarding template ::toolkit module. You can send your questions to this mailing list and we'll do our best to help. Dave... __

Re: [Templates] how to organize tt2 files if using tt2 with perl

2011-07-23 Thread Dave Cross
On 07/23/2011 09:11 AM, Peter Teichert wrote: >INCLUDE_PATH => [ > '/site1/src', # src > '/site1/lib', # lib >], I bet that's not really where those directories are. I expect that should actually be: INCLUDE_PATH => [ 'site1/src', #

Re: [Templates] problem with array and FOEARCH

2010-08-18 Thread Dave Cross
ist sin of retyping code that he wants help with. Cheers, Dave... -- Dave Cross :: d...@dave.org.uk http://dave.org.uk/ @davorg ___ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates

Re: [Templates] problem with array and FOEARCH

2010-08-18 Thread Dave Cross
g is not empty. Maybe not. But you don't seem to be copying it to the template variable correctly. Dave... -- Dave Cross :: d...@dave.org.uk http://dave.org.uk/ @davorg ___ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates

Re: [Templates] Hi I'm lazy... JSON plugin

2010-08-08 Thread Dave Cross
.org/ Dave... -- Dave Cross :: d...@dave.org.uk http://dave.org.uk/ @davorg ___ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates

Re: [Templates] verifying variables

2010-06-13 Thread Dave Cross
On 06/13/2010 09:18 AM, dark0s wrote: > I import from cgi script tt2 variables (strings) > How can verify is tt2 variable is defined, that is to say, > How can verify is variable is NULL or '' or not? See the "defined" vmethod in the documentation. http://tt2.org/docs/manual/VMethods.html Dav

Re: [Templates] .replace(ing) ?

2010-02-17 Thread Dave Cross
On 02/17/2010 01:00 PM, Tosh Cooey wrote: > Sorry Chad you're right, that was a working example, try this: > > dev:~# tpage > output > > [% link = 'http://site.com?oops' %] > [% linkText = 'http://site.com?oops' %] > [% ahref = '' _ linkText _ '' %] > [% bodyText = "Some text waiting for link ins

Re: [Templates] Date and Time Template tool kit

2010-02-04 Thread Dave Cross
On 02/04/2010 06:55 AM, hemanth reddy wrote: > Hi > * > * > > *[% close_time="2000/12/21 4:20:36" %] > > how to covert close_time to number of seconds since epoch > > > can i do it using [%USE Date%]? No. But you can do it using Template::Plugin::DateTime (which you can get from CPAN[1]). [%

Re: [Templates] remove space with backspace

2009-10-27 Thread Dave Cross
2009/10/27 Rajesh Saha : > Hi, > > Actually, in my output, I am getting some spaces, which I didn't wanted to > be. At the same time, I could not figure out, from where it is coming. So, > as a work-around, I wanted something "backspace" so that I can eliminate > that spaces. > > I have tried [%- s

Re: [Templates] reply to all - default?

2009-10-22 Thread Dave Cross
On 22/10/09 20:25, Bill Moseley wrote: > On Thu, Oct 22, 2009 at 12:19 PM, Felipe Gasper (cPanel) > wrote: > >> Can this list not be set for an individual subscriber to have >> reply-to-all as the default reply option? >> >> I know it can be set that way for the entire list...I just want to set >>

Re: [Templates] double variable lookup in interpolated string?

2009-10-22 Thread Dave Cross
On 10/22/2009 07:31 PM, Felipe Gasper (cPanel) wrote: > Hi all, > > What is the syntax I am looking for here? > > - > FOR key = hash.keys; > "The value for $key is ${hash.$key}."; > END; > - > > The above syntax produces errorsI assume there is a way to do what > I wan

Re: [Templates] double variable lookup in interpolated string?

2009-10-22 Thread Dave Cross
On 10/22/2009 08:15 PM, Felipe Gasper (cPanel) wrote: > Dave Cross wrote on 22 10 2009 1:52 PM... > > On 10/22/2009 07:31 PM, Felipe Gasper (cPanel) wrote: > >> Hi all, > >> > >> What is the syntax I am looking for here? > >&

Re: [Templates] double variable lookup in interpolated string?

2009-10-22 Thread Dave Cross
On 10/22/2009 07:31 PM, Felipe Gasper (cPanel) wrote: > Hi all, > > What is the syntax I am looking for here? > > - > FOR key = hash.keys; > "The value for $key is ${hash.$key}."; > END; > - > > The above syntax produces errorsI assume there is a way to do what > I wan

Re: [Templates] Embeding Perl in Web Pages

2009-09-09 Thread Dave Cross
On 09/09/09 19:14, sono...@fannullone.us wrote: > Hello, > > I'm looking into learning Perl over PHP, but the one thing I really > like about PHP is that you can embed code directly in the web page. > > I was wondering if TT allows you to do the same thing, or something > similar, or if

Re: [Templates] Template::Plugin::Latex 3.01 released

2009-03-12 Thread Dave Cross
Andrew Ford wrote: > * fixed some of the tests that were failing if the dvitype program was > not installed (now just skips those tests) This fix doesn't seem to be working on Linux. There's something strange about your TAP output - multiple plans from one test file. Let me know if there's an

Re: [Templates] TAG_STYLE, START_TAG, END_TAG

2008-08-24 Thread Dave Cross
Bill Ward wrote: > On Sat, Aug 23, 2008 at 6:09 AM, Ash Berlin <[EMAIL PROTECTED]> wrote: >> Who do i have to ask to get the TT list to pleease set a reply-to >> header? > > Whoever you ask, I hope they ignore your request. > http://www.unicom.com/pw/reply-to-harmful.html Let's not get into this

Re: [Templates] Dual pass template processing

2008-01-29 Thread Dave Cross
Mark Knoop wrote: > Hi > > I am new to TT and haven't read the book yet so sorry if this is a daft > question. > > I have been using my own template system (how predictable) for generating > XHTML pages but am considering whether to start using TT. One of the > features of my system is that on

Re: [Templates] TT IDE

2008-01-18 Thread Dave Cross
Quoting Angel Kolev <[EMAIL PROTECTED]>: > Hi, guys. > Is there any editor for TT with highlighting and autocomplete? What you use? I wrote an emacs mode for TT. All it really does is syntax highlighting. And even that is a bit flaky at times. You can get it from http://dave.org.uk/emacs/ Pat

Re: [Templates] What happened to TT3?

2007-12-11 Thread Dave Cross
Quoting Andy Wardley <[EMAIL PROTECTED]>: > Nikolay Ananiev wrote: >> Hey there, I'm new to TT and I love it. >> I saw the dev version of TT3 and was wondering why it was never finished. >> I couldn't find anything on google. > > Hi Nikolay, > > I've been working on it off-and-on for, er, several

Re: [Templates] Problem with URL ecoded vars? Upgraded from Template-Toolkit v 2.11 to 2.19

2007-09-15 Thread Dave Cross
David Martin wrote: > Hello, > > My first post to the list in maybe 3 years. Back in 2003-4 my partner and I > built a midsize educational framework Class::DBI and Template-Toolkit (v > 2.11 then, 2.19 now) project for the U.S. Dept. of Education. It worked > fine for 4 years until the host fold

Re: [Templates] ToolKit install

2007-07-13 Thread Dave Cross
Amer R. Child wrote: Good Day, I am in the process of trying to get Template Tool installed on Win XP when I do the make using nmake I get the following errors: [ snip ] Does anyone have any suggestions? Do I need to have something else running? Why are you building the mo

Re: [Templates] sending header as text/html

2007-05-22 Thread Dave Cross
Ken Perl wrote: Dave, I tried the put [% USE CGI; CGI.header %] in the default-template, but it seems I still see the html source code in the firefox2.0, any idea what is wrong? why it doesn't work? Does the output you see include the CGI header? This might not be a TT issue at

Re: [Templates] XML.DOM plugin for Perl Template Toolkit

2007-05-21 Thread Dave Cross
Oliver Ruebenacker wrote: Is Template-XML available as RPM for Fedora 6 or 7? Thanks! It seems not. http://download.fedora.redhat.com/pub/fedora/linux/extras/6/i386/ It looks like the packager hasn't noticed the fact that the XML plugins were moved out to a separate distribution a year a

Re: [Templates] XML.DOM plugin for Perl Template Toolkit

2007-05-21 Thread Dave Cross
Oliver Ruebenacker wrote: Dear friends, Yes, installation of the Perl Template Toolkit itself is easy with yum, but finding the necessary plugins is not. PTT (command: ttree) tells me: ! plugin error - XML.DOM: plugin not found I already installed perl-XML-DOM via yum and a bunch of ot

Re: [Templates] sending header as text/html

2007-05-21 Thread Dave Cross
Ken Perl wrote: how can I include the code, print "Content-type: text/html\n\n"; You know that only creates a _really_ correct CGI header on a Windows web server :) into the wrapper default-template ? I use the wrapper like this, [% WRAPPER default-template %] Use the CGI plugin[1].

Re: [Templates] Is there something like TT2Editor plugin for Eclipse

2007-05-04 Thread Dave Cross
Mihai Bazon wrote: On a related note, I'd love to see an Emacs mode as well. I'm using http://dave.org.uk/emacs/tt-mode.el but it's rather limited. (in fact it's only for syntax highlighting) Any other suggestions? What else would you like to see in it? Patches welcome? Dave... ___

[Templates] SQL::Translator Errors

2006-07-31 Thread Dave Cross
I was trying to build SQL::Translator, but it failed a few tests. There's already a bug in rt.cpan.org describing the problem http://rt.cpan.org/Public/Bug/Display.html?id=20047 But then I found that the person who raised that bug had investigated further and discovered that the problem only

Re: [Templates] Template::Plugin::DBI - Using an existing db handle

2006-06-27 Thread Dave Cross
Evan Kaufman wrote: And then, on the perl side, I specify the dbh, and the query: my $dbh = DBI->connect("dsn-stuff"); $tt->process("page.html", { global_dbh => \$dbh, genre_query => "SELECT ID, Desc FROM Table;" } ); There's no need to take a reference to your database handle. Try ju

Re: [Templates] Plans for Template-Latex

2006-06-06 Thread Dave Cross
Andrew Ford wrote: Having had more of a look through the Template-Latex code I plan to make (at least) two releases in the next couple of weeks. Andrew, The release of Template::Latex that is currently on CPAN (2.16) claims to require TT 2.16. But the latest released version of TT is 2.15.

Re: [Templates] basic Apache+Template questions

2006-04-30 Thread Dave Cross
markd wrote: I'm new to using Template, and tried to install Apache::Template, but it appears not compatible with Apache2. Is that correct? That's right. Geoff Young did an experimental port to Apache2 which was available at http://www.modperlcookbook.org/~geoff/modules/experimental But

Re: [Templates] Date and calc

2005-12-05 Thread Dave Cross
Dave Cross wrote: ecocode wrote: Hi, I'd like to insert a calculated date in a template . I tried this : [% USE date %] [% calc = date.calc ; monday = calc.Today_and_Now ; monday = Add_Delta_Days(monday,7) %] [% monday.join('/') %] But it does not work. I think it is due t

Re: [Templates] Date and calc

2005-12-05 Thread Dave Cross
ecocode wrote: Hi, I'd like to insert a calculated date in a template . I tried this : [% USE date %] [% calc = date.calc ; monday = calc.Today_and_Now ; monday = Add_Delta_Days(monday,7) %] [% monday.join('/') %] But it does not work. I think it is due to the format of monday which I think

Re: [Templates] Creating PDF Output

2005-11-29 Thread Dave Cross
Cedric Boudin wrote: Mark Schoonover wrote: Thanks Dave. Don't know anything about LaTeX, but that's easy to fix! So, in a nutshell, it looks like I create a LaTeX page with what I need, then TT will magically convert it to PDF?? That is not how I'd do it. create your latex with TT and then

Re: [Templates] Creating PDF Output

2005-11-29 Thread Dave Cross
Mark Schoonover wrote: Thanks for Reading! I have a need to output PDF. Right now I use PDFLib, but am looking for a way to use TT to generate the PDFs I need. I'm not sure exactly how I'd do this, but here's the info I need in PDF format. Basically, it's a couple jpeg images, with text de

Re: [Templates] Everyone Uses TT

2005-11-18 Thread Dave Cross
Perrin Harkins wrote: Dave Cross wrote: Of course I wasn't surprised to see that Catalyst[2] uses TT, but when Simon Willison showed an example of Django[3] (a Python Framework) templates, it looked really similar to TT (they use {% ... %} instead of [% ... %]). Apparently they &quo

[Templates] Everyone Uses TT

2005-11-18 Thread Dave Cross
One thing that struck me at last night's Web Frameworks Night[1] was how many projects are actually using TT (or, at least, code that looks a lot like TT) even if they don't know it. Of course I wasn't surprised to see that Catalyst[2] uses TT, but when Simon Willison showed an example of Dj

Re: [Templates] preprocess

2005-11-16 Thread Dave Cross
Fagyal Csongor wrote: Hi, Sorry I haven't changed the subject line :-( Mea culpa! That doesn't matter. If you're starting a new discussion on a mailing list then you should start with a brand new email. You shouldn't just reply to an existing email. Even if you change the subject line, you

Re: [Templates] Example code where?

2005-09-29 Thread Dave Cross
Kiffin Gish wrote: Just wondering where I might get some example code and templates (zipped-file) for a solid dynamic website based on the template-toolkit. I am looking into using TT as the framework for a customer self-help page. You could try the examples from the Badger book (http://exam

Re: [Templates] New plugin: Pluralize

2005-09-29 Thread Dave Cross
IvorW wrote: -Original Message- From: Dave Cross [mailto:[EMAIL PROTECTED] Sent: 28 September 2005 17:08 To: IvorW Cc: templates@template-toolkit.org Subject: Re: [Templates] New plugin: Pluralize Lingua::EN::Inflect - http://search.cpan.org/dist/Lingua-EN-Inflect/ But, is there a

Re: [Templates] New plugin: Pluralize

2005-09-28 Thread Dave Cross
IvorW wrote: Folks, I have a need for a pluralizer plug-in in some templates I am working on. see http://search.cpan.org/~kvail/Text-Pluralize-1.0/lib/Text/Pluralize.pm for what I mean. Has anybody already done this? Lingua::EN::Inflect - http://search.cpan.org/dist/Lingua-EN-Inflect/ -- Si

Re: [Templates] Re: tt-mode.el

2005-09-28 Thread Dave Cross
Uwe Voelker wrote: Hello Dave, [1] An emacs editing mode for TT files. This is a major mode. Any chance this could become a minor mode (or something that can be combined with html/sgml mode)? When writing TT html templates (in html mode) the [% %] tags confuse the html indentation. Is

[Templates] tt-mode.el

2005-09-27 Thread Dave Cross
Sam Vilain (who seems to work on it more than I do) has sent me another patch for tt-mode.el[1]. Sam says: I've updated TT mode to be a little bit better again. multi-line TT sections (up to 13 lines or so ... ?), and keywords that follow semicolons should now be highlighted - also [%

Re: [Templates] format and computations

2005-09-13 Thread Dave Cross
Frederik Ramm wrote: Dear List, I have a variable given in Cents and I want to print it out in Dollars. I know that I can write a filter routine in Perl but I would prefer to do it all in the template. I tried this: [%- USE format -%] [%- dollars = format('%.2f') -%] ... [% dollars(amount/

Re: [Templates] Formatting plain text

2005-09-12 Thread Dave Cross
mc lum wrote: Hi.. I would like to unsubcribe this. Please guide me how to do it. There's a lot of useful information in the headers of every message to the list: List-Help: List-Post: List-Subscribe:

Re: [Templates] Formatting plain text

2005-09-12 Thread Dave Cross
Nigel Metheringham wrote: Is there a clean TT method of doing something like this - ie "picture based formatting" with the ability to line wrap, fill, indent etc. The indent and format filters might well do a lot of what you want. http://www.template-toolkit.org/docs/plain/Manual/Filters.html

Re: [Templates] make fails

2005-08-29 Thread Dave Cross
Obantec Support wrote: - Original Message - From: "Dave Cross" <[EMAIL PROTECTED]> To: "Obantec Support" <[EMAIL PROTECTED]> Cc: Sent: Monday, August 29, 2005 5:43 PM Subject: Re: [Templates] make fails TT is available as an RPM for FC4. I think it&

Re: [Templates] make fails

2005-08-29 Thread Dave Cross
Obantec Support wrote: Hi I need to install template-toolkit 2.14 on FC3 but when i make i get perl Makefile.PL make Failed 2/90 test scripts, 97.78% okay. 2/2596 subtests failed, 99.92% okay. make: *** [test_dynamic] Error 255 TT is available as an RPM for FC4. I think it's in the Extras

Re: [Templates] Re: Creating $tt2 on server startup

2005-08-27 Thread Dave Cross
Robert wrote: Randal L. Schwartz wrote: "Sergey" == Sergey <[EMAIL PROTECTED]> writes: Sergey> This is the "downloader" script: Sergey> Sergey> #!/usr/bin/perl Fascinating to watch people reinvent "ab" which comes with every Apache release. So that I am not one of th

Re: [Templates] Apache::Template and updated FC4

2005-08-22 Thread Dave Cross
Luke Meyer wrote: Randy Kobes wrote: For mod_perl 2, try the Apache-Template package at http://www.modperlcookbook.org/~geoff/modules/experimental/ Can't locate object method "new" via package "Apache::Request" (perhaps you forgot to load "Apache::Request"?) at /usr/lib/perl5/site_perl/5.8

Re: [Templates] Class::DBI retrieve_all to TT?

2005-07-22 Thread Dave Cross
On Thu, Jul 21, 2005 at 04:11:28PM -0500, Will wrote: > As I mentioned in an earlier post, I have both Class::DBI and TT working > individually just fine. The problem I have now is getting the results of > a Class::DBI retrieve_all method call into my TT template variables. > > I have in my scri

[dave@dave.org.uk: Re: [Templates] (no subject)]

2005-06-24 Thread Dave Cross
Forgot to copy the list :( - Forwarded message from Dave Cross <[EMAIL PROTECTED]> - From: Dave Cross <[EMAIL PROTECTED]> Date: Fri, 24 Jun 2005 16:46:54 +0100 Subject: Re: [Templates] (no subject) To: robert colonna <[EMAIL PROTECTED]> On Fri, Jun 24, 2005 at 11:34:

Re: [Templates] sorting a hash by values

2005-06-20 Thread Dave Cross
[ reordering to make sense of the discussion ] On Mon, Jun 20, 2005 at 02:08:20AM -0600, Josh Rosenbaum wrote: > > Buddy Burden wrote: > > > >Doesn't this > > > > [% FOREACH r = ref.sort('number') %] > > > >work? > > This would not work since that usage of 'sort' is only for an array ref, >

Re: [Templates] Textpad document class (syn file) for Template-Toolkit

2005-06-15 Thread Dave Cross
On Wed, Jun 15, 2005 at 09:07:21AM -0700, Peter Kay wrote: > I assume there's something to create an emacs mode out there It's pretty basic, but I wrote a tt_mode.el. It's at http://dave.org.uk/emacs/ Dave... -- I'm your only friend / I'm not your only friend But I'm a little glowing f

Re: [Templates] html quoting

2005-05-27 Thread Dave Cross
On Fri, May 27, 2005 at 02:56:37PM -0700, Steve Kelem wrote: > I'm building web pages with TT. Something in the tool chain seems to > know what & and < are, but not what the math symbols like × > are. Are you using XML processing at some point? & is one of a (very) small number of entities whos

Re: [Templates] error message needs improvement

2005-05-20 Thread Dave Cross
On Thu, May 19, 2005 at 04:11:15PM -0700, Steve Kelem wrote: > I'm using the latest stable Template Toolkit. > > I'm now trying to build my structure following the examples in Chapter > 11 of the Template Toolkit book. > I'm using the xml-map to describe the menu structure. During build, I > ge

[Templates] vStrings in TT

2005-04-08 Thread Dave Cross
I've just come close to persuading another client to use TT for some of their work, but by accidently running a script against the wrong version of Perl we discovered a small problem. Template::Document uses vStrings to work out which version of utf8 support it is going to use. This is a slight pr

Re: [Templates] rounding numbers

2005-02-17 Thread Dave Cross
On Thu, Feb 17, 2005 at 03:00:09PM +0100, [EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote on 17.02.2005 11:38:44: > > > You can write a couple of simple macros to do it for you: > > > > [% MACRO ceiling(n) > > GET n + 1 > > FILTER format("%d"); > > > > > >MACRO floor(n) > >

Re: [Templates] List archives with TT

2005-01-31 Thread Dave Cross
On Mon, Jan 31, 2005 at 03:04:08PM -0800, Bill Moseley wrote: > Can anyone suggest a list archive tool that would work well with TT? > What I'm looking for is a tool to deal with managing the archive (list > by date/author/subject/thread and previous next lists) but use TT to > dynamically generate

Re: [Templates] tt->process(url) ?

2004-12-29 Thread Dave Cross
On Tue, Dec 28, 2004 at 11:23:55AM -0800, Ken A wrote: > Hello, > > I'm trying to use TT to process templates on another server. > Can process method take a url? > > Instead of this: > $tt->process('welcome.tt2') > > Can I do this: > $tt->process('http://someotherhost/welcome.tt2') >From "perld

[Templates] TT article in TPJ

2004-12-21 Thread Dave Cross
The December issue of TPJ (http://tpj.com/ - subscription required) contains a good article by brian d foy on building new module distributions. The solution he discusses uses TT and is based on Mark Fowler's mmm (my module maker) script. It's a good example of using TT in a non-web context. Dave

Re: [Templates] Postscript Templates

2004-12-17 Thread Dave Cross
On Fri, Dec 17, 2004 at 01:24:50PM +0100, Harald Kerst wrote: > We use the TemnplateToolKit in our CMS; > We would like to generate PS-Files (from which we will generate PDF files) > with the data contained in our CMS database. > > Does anybody have a working example for generating PS files with P

Re: [Templates] pre/post chomp question....

2004-12-13 Thread Dave Cross
On Mon, Dec 13, 2004 at 11:48:40AM -0500, Sean T Allen wrote: > if i have the following at the start of a template: [ snip ] > shouldnt this remove all whitespace and newlines proceeding the doctype > line? Seems to work as expected using tpage: $ cat temp.tt [%- DEFAULT mc = 'WPJF1' -%] [%-

Re: [Templates] Dennis Daupert/GIS/CSC is out of the office

2004-12-13 Thread Dave Cross
On Mon, Dec 13, 2004 at 01:02:33AM -0500, Dennis Daupert wrote: > > I will be out of the office starting 12/08/2004 and will not return until > 12/15/2004. > > Dennis Daupert/GIS/CSC is out of the office until Dec 15. Can a list admin please set Dennis at nomail until he gets back. And Dennis,

Re: [Templates] SELECT CASE question

2004-11-30 Thread Dave Cross
On Tue, Nov 30, 2004 at 09:43:36AM -0500, Cees Hek wrote: > Also, if you don't mind renaming your styles, you can simplify it to > just use id="trcol[% loop.count % 2 %]", where your styles would then > be trcol0 and trcol1. Or, to avoid renaming the styles: id="trcol[% loop.count % 2 + 1 %]"

Re: [Templates] How to use the template toolkit with a hash?

2004-11-28 Thread Dave Cross
On Sun, Nov 28, 2004 at 07:07:22PM +, Markus Linke wrote: > Hi, > > I am trying to use the template toolkit to built configuration files > for a network management system. > > Currently the data-structure looks like this: > > $VAR1 = { [ snip - a simpler expample would have worked just as w

Re: [Templates] Embedding tags within tags

2004-11-10 Thread Dave Cross
On Wed, Nov 10, 2004 at 08:18:50PM -0500, Robert Hicks wrote: > Can I put a value in my variables (say value => 'name') where that name is a > lib that is called depending on a switch statement? > > [% INCLUDE [% value %] %] > > Then that value would be be changed to the lib name I want to includ

Re: [Templates] [PL] Coding for Y/N radio buttons

2004-10-29 Thread Dave Cross
On Fri, Oct 29, 2004 at 02:35:45PM -0400, Buddy Burden wrote: > Rod, > > >Is 'CHECKED' xhtml compliant? I probably need to go back to the books > >and standards but I thought it had to checked="checked". > > Well, my favorite HTML syntax site says it's cool, so that's probably > where I picked

Re: [Templates] Returning a select using multiple tables

2004-10-25 Thread Dave Cross
On Mon, Oct 25, 2004 at 09:42:04AM -0400, Robert wrote: > My select statments looks like this (from ORACLE): > > SELECT surname, first_name, msf810.email_address, msf810.employee_id > > When I plug this into a loop it looks like this: > > [% user.SURNAME %] > [% user.FIRS

[Templates] TT Articles

2004-10-03 Thread Dave Cross
I've put a few more TT articles online. It's a series of tutorials that were published in "Linux Format" earlier this year. Part 1 - The Basics http://mag-sol.com/Articles/tpage.html Part 2 - Using ttree http://mag-sol.com/Articles/ttree.html Part 3 - Using Templates fr

Re: [Templates] Nested menu problem from TT book

2004-10-02 Thread Dave Cross
On Sat, Oct 02, 2004 at 10:02:14AM -0700, Ovid wrote: > --- Ovid <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > I've been playing around with the nested menus in Chapter 11 from > > the TT book, but the URLs seem wrong: > > Grr .. please disregard. I worked on this for over an hour last night, >

[Templates] TT Without Perl

2004-10-01 Thread Dave Cross
Following a discussion on my use.perl journal[1], I'd be really interested in hearing about anyone who is using TT but not Perl - that is using templates with tpage, ttree or Apache configured with Apache::Template (or similar) such that useful applications are developed purely in TT without needin

Re: [Templates] Creating XML in TT2

2004-09-20 Thread Dave Cross
On Mon, Sep 20, 2004 at 01:22:17AM +0200, Tosh Cooey wrote: > So far all the XML plugins available for TT2 are for taking XML and > converting it to a data object that TT2 can do stuff with. > > Hasn't anyone wanted to take the '$vars' passed to "process" and turn them > into XML? I can't be th

Re: [Templates] Archive of list anywhere?

2004-09-15 Thread Dave Cross
On Wed, Sep 15, 2004 at 03:56:09AM -0700, Bart Simpson wrote: > Is there an archive of the this mailing list anywhere? Did you try looking at the URL at the bottom of the email? > ___ > templates mailing list > [EMAIL PROTECTED] > http://lists.template-

Re: [Templates] Simple Error Question

2004-09-03 Thread Dave Cross
On Fri, Sep 03, 2004 at 11:01:06AM +0200, Denis Banovic wrote: > Hi all! > > I'm using this simple error-checking sample to check if Template > processing was OK. > > $template->process($file, $vars) > || die $template->error(), "\n"; > > But, if let's say result of the process is "" ( em

Re: [Templates] Foreach LOOP to create HTML

2004-07-20 Thread Dave Cross
On Tue, Jul 20, 2004 at 02:56:03PM -0700, Roderick A. Anderson wrote: > I'm starting to create a some code that begs to be handled by TT (or > perl). I can do it in the CGI script but I'd like ot try out this new > tool -- TT2. > > Here's what I'm not liking using TT2. > >

Re: [Templates] Odd....

2004-07-01 Thread Dave Cross
On Wed, Jun 30, 2004 at 12:46:53PM -0400, Dylan Hardison wrote: > > (hmm, gmail's "reply" sends to the person, while "reply all" sends to > the list + the person... > Oh how I miss mutt) It's nothing to do with your email client. It's that this mailing list is configured not to mess around wi

Re: [Templates] Odd....

2004-06-29 Thread Dave Cross
On Tue, Jun 29, 2004 at 09:37:38PM -0400, Dylan Hardison wrote: > The list thinks I'm subscribed, but I haven't gotten any mail from it > since... March. > > I think @tampabay.rr.com is blocking it or something. that sucks... > Anyway, what've I missed? http://www.template-toolkit.org/pipermail/t

Re: [Templates] interpolate template var in template include with ttree

2004-06-05 Thread Dave Cross
On Sat, Jun 05, 2004 at 01:05:48PM +0200, Stefan Höfs wrote: > Is there anything possible like this with ttree > > [% runmode = 'home.atml %] > [% INCLUDE [% rumode %] %] Just use variables. [% runmode = 'home.atml' %] [% INCLUDE $runmode %] -- New .sigs Running in please parse _

Re: [Templates] TT2 quick reference card

2004-06-04 Thread Dave Cross
On Fri, Jun 04, 2004 at 02:39:49PM +0100, Andy Wardley wrote: > darren chamberlain wrote: > > Maybe you could use the other badger picture, the one that Andy wanted > > originally, instead of the O'Reilly trademarked one? > > This one: > > http://wardley.org/images/misc/badger.png > > A much n

Re: [Templates] paginator - newbie question

2004-05-24 Thread Dave Cross
On Sat, May 22, 2004 at 02:12:16PM -0400, leegold wrote: > Dave et. al, > Previous post example has been a great help, forced me to learn my > data structures esp. hash arrays. I have question about output. > > Last page should have the 7th rec. but 7th rec.is not showing. > What is cause? Should

Re: [Templates] ttree message when copying files

2004-05-24 Thread Dave Cross
On Mon, May 24, 2004 at 11:53:53AM -0400, Barbara Freeze wrote: > > We just installed Template Toolkit version 2.13 (30 Jan 2004). When I > use ttree to build my system now, it is giving me messages like this > when it finds files that are to be copied: > > Use of uninitialized value in concatena

Re: [Templates] paginator woes and problems

2004-05-21 Thread Dave Cross
On Fri, May 21, 2004 at 02:09:34PM -0400, leegold wrote: > > > > > Is this perl code? > > Oh it's output sorry, I not that bad. > I think I need the .pl file - see my previous post. Thanks. I didn't use a Perl program. I used tpage. (ok, so tpage _is_ a Perl program... but you know what I mean

Re: [Templates] paginator woes and problems

2004-05-21 Thread Dave Cross
On Fri, May 21, 2004 at 12:39:04AM -0400, leegold wrote: > For the past couple of days I have been trying to understand* how to > use a paginator in Perl. I am learning template toolkit because it > seems a lot of paginator modules use the toolkit. So ie. 20 > results/page w/back and forward links.

Re: [Templates] Info on Template::Plugin::XML::RSS?

2004-05-20 Thread Dave Cross
On Thu, May 20, 2004 at 07:32:04PM -0400, Mike Blasenstein wrote: > My hosting provider has this module, and I'm kind of a Perl/Template > newbie and am a little lost. I'm finding my way, but it's usually > easier for me if I have examples and/or documentation to look at. > > I really don't want

[Templates] Badgers on Safari

2004-04-09 Thread Dave Cross
I've just noticed that the badger is now available on Safari. http://safari.oreilly.com/0596004761 Dave... -- This is the definition of my life ___ templates mailing list [EMAIL PROTECTED] http://lists.template-toolkit.org/mailman/listinfo/templa

Re: [Templates] Rendering a document to PDF

2004-03-12 Thread Dave Cross
On Fri, Mar 12, 2004 at 11:16:35AM -0500, Andy Joslin wrote: > All, > I'm investigating several different options for automating a > document generation. The requirements are at the end of the day, the > document must be a PDF with consistent headers and footers, and a TOC > that includes pag

[Templates] Examples Needed

2004-03-04 Thread Dave Cross
I'm writing a series of articles on TT for the British Linux magazine "Linux Format". One of the things I'm concentrating on (at least in the first two articles) is the use of TT for non-web applications. For the second article I want to use examples that involve generating various kinds of config

Re: [Templates] count() function in XPath

2004-02-19 Thread Dave Cross
On Wed, Feb 18, 2004 at 09:07:43AM +, Dave Cross wrote: > On Wed, Feb 18, 2004 at 10:51:57AM +1100, Bruce Britts wrote: > > Hi, > > > > I'm attempting to use the XML::XPath count() function and will > > get, 'XML::XPath::Node::Element=SCALAR(0x1fa

Re: [Templates] count() function in XPath

2004-02-18 Thread Dave Cross
On Wed, Feb 18, 2004 at 10:51:57AM +1100, Bruce Britts wrote: > Hi, > > I'm attempting to use the XML::XPath count() function and will > get, 'XML::XPath::Node::Element=SCALAR(0x1fa205c)' returned instead > of the expected integer using the code below; > > [% FILTER null; > USE indx

Re: [Templates] Test

2004-02-03 Thread Dave Cross
On Wed, Feb 04, 2004 at 09:53:56AM +0530, [EMAIL PROTECTED] wrote: [a virus] I hope it's obvious to everyone, but a) the previous message contains the MyDoom virus and b) it didn't really come from me. Dave... -- New .sigs Running in please parse __

Re: [Templates] TT2 Emacs Mode (Again)

2004-01-30 Thread Dave Cross
On Fri, Jan 30, 2004 at 08:15:05AM +, Dave Cross wrote: > On Thu, Jan 29, 2004 at 03:16:04PM -0800, Benj. Mako Hill wrote: > > TT syntax highlight was brought up twice on the list on 2002 and Dave > > Cross put up a version at a URL that now seems to be dead. > > &g

Re: [Templates] TT2 Emacs Mode (Again)

2004-01-30 Thread Dave Cross
On Thu, Jan 29, 2004 at 03:16:04PM -0800, Benj. Mako Hill wrote: > TT syntax highlight was brought up twice on the list on 2002 and Dave > Cross put up a version at a URL that now seems to be dead. > > I found an old copy somewhere but I thought I'd ask Dave if he has a > ne

[Templates] TT Advocacy

2004-01-27 Thread Dave Cross
I was just reminded of something that was discussed in my use.perl journal recently and of an action I was going to take. The discussion in question is at Does anyone thing that a list of sites using TT would be a useful addition to the TT web site? And

Re: [Templates] splitting up long pages

2004-01-21 Thread Dave Cross
On Wed, Jan 21, 2004 at 04:02:41PM -0500, Rafael Caceres wrote: > On Wed, 2004-01-21 at 12:50, Cahill, Earl wrote: > > You could also be maybe about the first to try my Data::ResultsHelper > > > > http://search.cpan.org/~earl/Data-ResultsHelper-1.00/ > > > > I downloaded the module, which indica

Re: [Templates] Newbie Question re sort and hash iteration

2004-01-20 Thread Dave Cross
On Sat, Jan 17, 2004 at 04:50:42PM -0600, D. Martin wrote: > Hi everyone, > > This is my first post to the list. I am very new to TT2. > > My problem is this, I am iterating over a hash and this: > > [% FOREACH n = school_details.sort %] >[% n %][% school_details.$n %] > [% END %] > >

Re: [Templates] Developer Version 2.12a

2004-01-14 Thread Dave Cross
On Wed, Jan 14, 2004 at 12:16:56PM +, Dave Howorth wrote: > > >And thanks to Dave,Darren and Andy for writing the shiny new book > > Hear, hear. > > >on my shelf! > > Well, no, it's on order but it apparently hasn't reached deepest > Cambridge yet. O'Reilly UK tell me that it has now made

  1   2   >