I will only try to answer question number one, as i'm not personally familiar with Template Toolkit.
In short, TMTOWTDI :-)
If you decide to create pages using a mod_perl handler, YOU decide on what basis you select the page that you return. It might be based on the "path" part of the url, or on the arguments supplied (i.e. http://host/some/stuff?page=somepage ) Or on the IP address of the user, or the user-agent string (but you really shouln't do THAT).
Anyway, you might want to take a look at This section of the Template Toolkit manual. It includes a section on serving templates via mod_perl, using the requested URL to determine the template file.
--
Joost | [reply] |
This information is all in the documentation. See Dynamic Content Generation Via Apache/mod_perl Handler in the web tutorial for a typical example. In any case, you can use pretty much any URL you want -- it's up to your module to take that URL and then determine which template to serve up. And amazingly enough, the Caching and Compiling Options section of the manual contains information about caching. :-)
-jehuni
| [reply] |
Don't get confused by the mention of caching. Template Toolkit does not cache output, it caches templates (to avoid reading them from disk and compiling them every time). If you want to cache output, you have to do that yourself. | [reply] |