> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] On Behalf Of > Bill Moseley > Sent: Thursday, January 24, 2002 8:59 AM > To: Simon Wilcox > Cc: [EMAIL PROTECTED] > Subject: Re: [Templates] TTree > > > At 01:04 PM 1/24/2002 +0000, Simon Wilcox wrote: > >On Wed, 23 Jan 2002, Bill Moseley wrote: > >> [%- WRAPPER page; PROCESS $template; END -%] > > >Please excuse the probably dumb questions but do you put this at the > >top of each of you template pages ? > > > > No, only in one template. Andy explained this quite well in > his reply. > > The files in the source tree are basically just content. > ttree loads each of those source files into $content > one-by-one, and then calls (process) my "wrapper" template. >
Ah, that is it! I have enlightment now! One file, "page" has the header/footer for each page, and then contents of the tree are just stuff to go in the [% content %] section. So basically, in laymans terms, this is the process: Pre-process the "config" file, then wrap the template file currently being processed, identified by $template, with template file "page", and when your finished, dump it in the dest dir. By George, I think I got it! > I have a file in my ttlib called "wrapper" that contains that > line. As Andy explained, I also have a file called "page" in > my ttlib that is the main template that all pages use -- it's > that "page" that makes the design of a site. > > The source files don't have much TT language in them. Each > file has a [% META %] section that is used to set the name of > the page, its title, and perhaps some processing directives > (e.g. some of my source files are cgi scripts so they should > not be formatted like a html page). > > I think Andy had a much clearer explanation ;) > > Bill Moseley > mailto:[EMAIL PROTECTED] > > _______________________________________________ > templates mailing list > [EMAIL PROTECTED] > http://www.template-> toolkit.org/mailman/listinfo/templates >
