On Oct 6, 2007, at 3:34 AM, Anthony Gardner wrote:

> At present, we have a standard set of templates but in the future,  
> we may need to deliver the same data but in a different style. This  
> will be set using a query string parameter.
[....]
> I've thought of just having a generic template entry point and then  
> calling the desired  starting template based on a simple IF ELSE   
> but hopefully there's a TT configuration way.

It's not exactly the same, but we have a similar setup to get  
different header/footer type things on our pages.

We use a "wrapper" ("PROCESS" => 'tpl/wrapper' in the  
configuration).  For example:
        https://svn.develooper.com/combust/trunk/apache/root_templates/tpl/ 
wrapper

The wrapper will call the real template and then call a "outer style  
template", based on the page.style variable that the "real" template  
can set.   The "style" will then include the real content from the  
real template by adding [% content %] wherever it should go.


   - ask

-- 
http://develooper.com/ - http://askask.com/



_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to