SPUG: Help

Scott_Peterson at agsea.com Scott_Peterson at agsea.com
Thu Nov 13 14:36:41 CST 2003


Help


                                                                                                                                        
                      spug-list-request@                                                                                                
                      mail.pm.org               To:       spug-list at mail.pm.org                                                         
                      Sent by:                  cc:                                                                                     
                      spug-list-bounces@        Subject:  spug-list Digest, Vol 5, Issue 5                                              
                      mail.pm.org                                                                                                       
                                                                                                                                        
                                                                                                                                        
                      11/13/2003 10:00                                                                                                  
                      AM                                                                                                                
                      Please respond to                                                                                                 
                      spug-list                                                                                                         
                                                                                                                                        
                                                                                                                                        




Send spug-list mailing list submissions to
             spug-list at mail.pm.org

To subscribe or unsubscribe via the World Wide Web, visit
             http://mail.pm.org/mailman/listinfo/spug-list
or, via email, send a message with subject or body 'help' to
             spug-list-request at mail.pm.org

You can reach the person managing the list at
             spug-list-owner at mail.pm.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of spug-list digest..."


Today's Topics:

   1.  Template Toolkit problems (Tim Maher)
   2. Re:  Template Toolkit problems (Bill Campbell)
   3. Re:  Template Toolkit problems (kellan at protest.net)


----------------------------------------------------------------------

Message: 1
Date: Wed, 12 Nov 2003 17:52:08 -0800
From: Tim Maher <tim at consultix-inc.com>
Subject: SPUG: Template Toolkit problems
To: spug-list at pm.org
Message-ID: <20031112175208.A11456 at timji.consultix-inc.com>
Content-Type: text/plain; charset=us-ascii

SPUGsters,

I thought I'd whip up a couple of quick websites using the
Template Toolkit, along with the "skeleton" templates this
afternoon, rather than doing it all the hard way (as I
usually do).

But although I spent a lot of time trying to make it work, all in all
it was a very frustrating experience -- which I'd like to achieve some
closure on by making it work once and for all! 8-}

After a few hours of banging my head against it,
I finally come to the conclusion that the "build" program
(which just calls ttree) doesn't properly compare timestamps to see
what templates are newer than their corresponding *.html pages,
nor does it properly check dependencies in the tree of web pages
to detect when html/index.html, e.g., needs to be rebuilt even if
src/index.html isn't any newer, because other "configuration"
files have changed.

I may be wrong, or doing something wrong, of course, but these
conclusions explain my experiences thus far.

For example, after changing templates/lib/site/logo, which
determines part of what goes into html/index.html, build won't
usually recreate index.html. But if I use touch to back-date it
by 9 months, or remove the file altogether, then it *will*
rebuild it.

Another problem is that I can't figure out how to customize the
navigation menu I get by default on the left side of every page; it
definitely comes from templates/lib/config/map, which I've edited
to define some changes, but my changes never show up in
html/index.html, even when I make sure that file gets rebuilt.

I'd be grateful if somebody could clue me in on how to make this
work! Feel free to give me a call (at the number below) tonight
if you're willing to help me out.

*------------------------------------------------------------*
| Tim Maher (206) 781-UNIX  (866) DOC-PERL  (866) DOC-UNIX   |
| tim(AT)Consultix-Inc.Com  TeachMeUnix.Com  TeachMePerl.Com |
*+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-*
| CLASSES: Min. Perl: 12/1; Perl: 12/2-4; Perl Modules: 12/5 |
|   Watch for my Book: "Minimal Perl for Shell Programmers"  |
*------------------------------------------------------------*

------------------------------

Message: 2
Date: Wed, 12 Nov 2003 19:56:42 -0800
From: Bill Campbell <bill at celestial.com>
Subject: Re: SPUG: Template Toolkit problems
To: spug-list at pm.org
Message-ID: <20031113035642.GD42653 at alexis.mi.celestial.com>
Content-Type: text/plain; charset=us-ascii

On Wed, Nov 12, 2003, Tim Maher wrote:
>SPUGsters,
>
>I thought I'd whip up a couple of quick websites using the
>Template Toolkit, along with the "skeleton" templates this
>afternoon, rather than doing it all the hard way (as I
>usually do).

What template toolkit, HTML::Template?  I've been doing some work with this
in conjunction with CGI::Application, and CGI::Session, and find it very
easy to use.  The biggest problem is getting into the philosophy that an
HTML page is basically a source of arguments for a class method (e.g. via
CGI query->param()).

Bill
--
INTERNET:   bill at Celestial.COM  Bill Campbell; Celestial Software LLC
UUCP:               camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206)
236-1676
URL: http://www.celestial.com/

One man's brain plus one other will produce one half as many ideas as one
man would have produced alone.  These two plus two more will produce half
again as many ideas.  These four plus four more begin to represent a
creative meeting, and the ratio changes to one quarter as many ...
                         -- Anthony Chevins

------------------------------

Message: 3
Date: Thu, 13 Nov 2003 04:25:53 -0500 (EST)
From: kellan at protest.net
Subject: Re: SPUG: Template Toolkit problems
To: Tim Maher <tim at consultix-inc.com>
Cc: spug-list at pm.org
Message-ID: <Pine.LNX.4.52.0311130412460.21294 at protestnet>
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hi Tim,

I mostly use TT2 in a dynamic context so my expirence w/ ttree is limited.
However when I have used it the modification checking worked as expected,
don't know if that helps provide a data point for figuring out what is
going wrong.

> For example, after changing templates/lib/site/logo, which
> determines part of what goes into html/index.html, build won't
> usually recreate index.html.

Not sure about its dependency handling, though there was a patch added
last month to manually force dependencies.

> Another problem is that I can't figure out how to customize the
> navigation menu I get by default on the left side of every page; it
> definitely comes from templates/lib/config/map,

Is this some local file?  I don't have a config/map file in any of my TT2
installs.

My one coherent piece of advice would be ask on the templates[1] list,
Andy is incredibly helpful, and there has been a fair amount ttree
discussion going on lately.

kellan

1. http://www.template-toolkit.org/mailman/listinfo/templates

------------------------------

_______________________________________________
spug-list mailing list
spug-list at mail.pm.org
http://mail.pm.org/mailman/listinfo/spug-list


End of spug-list Digest, Vol 5, Issue 5
***************************************









More information about the spug-list mailing list