|Welcome to the Monastery|
Re^2: Abstracting away layout details when using large HTML::Template-based sites?by skx (Parson)
|on Dec 08, 2007 at 17:31 UTC||Need Help??|
Thanks for the reply, as you suggest my content will be coming from an external source, along with all other page data. In this case it will be coming from a database.
Your solution of moving things around doesn't really apply terribly well when I consider how I would be using this in practise I'm afraid.
For the simple case which I've presented it does work fine, but the general problem of recursively expanding templates doesn't.
One thing that I notice is if you have a layout.tmpl like this:
Things work! The page.inc containing:
Is correctly processed via this code:
So suddenly my problem is reduced to including variable files! Unfortunately a similar lack of recusive support means this doesn't work:
But via a filter I can get this same aim:
I don't know whether to feel pleased or dirty ..