I'm trying to figure out if TT can be used to solve a problem that I have: I need to generate several thousand static web pages, following a template. I've read the tutorials and other documentation, but the examples all seem to include the variable values in the template itself, which (I suppose) makes for a clearer example, but would be pointless in real life.
Here's a simplified example of what I want to do: 1. Create a data file with a list of names (e.g., "Manny", "Moe", and "Jack"). 2. Create a template that would simply display the sentence "This is [% name %]'s page", where [% name %] is a variable, to be read from the table. 3. Generate a different page for each name, and save the page as manny.html, moe.html, jack.html. So I would wind up with three html pages, one that says "This is Manny's page." (saved as manny.html), one that says "This is Moe's page." (saved as moe.html), and one that says "This is Jack's page." (saved as jack.html). The tutorial examples seem to assume a one-to-one correspondence between template pages and output pages. What I'm after is being able to use a single template page, and a data file, to generate a separate html page for each name in the data file. Can someone tell me if TT will do this, and if so, how? Or, if it's covered in the Badger book, tell me that (if you know for sure) and I'll buy the book. Thanks in advance for anyone who can help. Ralph -- Free downloadable jigsaw puzzles! http://www.train-puzzles.com/ http://www.free-jigsaw-puzzle-downloads.com/ http://www.airplane-jigsaw-puzzles.com/ http://download-jigsaw-puzzles.com/ _______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates
