Re: First template attempt: how to INCLUDE a list of subfiles?
Dave Howorth <dhoworth-fDajt2Yx3S8pY9vWkoisglpr/1R2p/[email protected]> Mon, 17 Dec 2012 10:49:41 +0000
| Newsgroups | gmane.comp.lang.perl.modules.template-toolkit |
|---|---|
| Organization | MRC Laboratory for Molecular Biology |
| Message-ID | <[email protected]> |
Michael Friendly wrote: > This is my first attempt to use the Template system & tpage to refactor > some old > web pages to make them more flexible for further development. > The web page I'm working on is at > http://www.datavis.ca/gallery/missed.php > and I simply want to generate each of the table rows from a template > file, that looks like that below. > > There's probably something very basic I'm missing, but the lines > [% FOREACH item IN items %] > [% INCLUDE item %] > [% END %] > produce no output in the tpage generated file. It's a little awkward to answer clearly without running the risk of offending you, so please don't take offence ... The big question and the most likely reason you're not seeing anything is that your items do not contain what TT expects. What do you know of what the INCLUDE directive does? What do your items contain (e.g. what exactly is "missed-nasa3.item")? Have you found the online TT docs? INCLUDE is described here, for example: http://www.template-toolkit.org/docs/manual/Directives.html#section_INCLUDE Cheers, Dave