On Mon, 16 Jul 2001, Stuart Johnston wrote:

> Tony Payne wrote:
>
> > This isn't the best written tutorial, nor is it 100% inclusive or 100%
> > correct.  However, it worked well for me when introducing Template-Toolkit
> > as part of our site generation process.
>
>
> I'd say that's a pretty good introductory tutorial but it's not really
> what I need.  I think my question was probably not very clear.
>
>
> So, for example, my script uses a template file called editprofile.html
> which is passed the variables, uid, first, last and email.  The webpage
> it generates should then return to the script with the variable
> process=updateprofile plus the new values for the variables passed to
> it.  And of course there is a whole list of these so I need a consise
> way of describing them.
>
> Does that make any sense?  Tony, it looks like maybe you define this in
> data_api.html.  Obviously I don't want you to give away any trade
> secrets or anything like that but maybe you could just share the format
> that you use.

I'm about to do the same work for our extropia.com's opensource ADT which
uses TT for views. I'm going to do the following:

On the top of every template I'm going to document:

- the purpose
- how this template can be called
- what arguments it expects to receive
- side effects? (e.g. some templates work with $output in PERLRAW block)

Add a document with an overview of the whole templating systems, probably
describing any variables available to all temlates (globals/statics) with
pointers to the authentic TT tutorials and manuals to delegate the pure TT
questions to the right documentation.

Think of each template as a Perl sub. If you know how to document your
perl API you will be able to do the same with templates.

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Reply via email to