Open eLod opened 13 years ago
Hi,
You are absolutely right; the plugin should work this way :) Its just not come up yet, the need to mix different template libraries in one app.
I dont really like checking for presence, its unneeded overhead 80% of the time (you normally use just 1 templating system). Statting the filesystem should be last resort as its a scaling and performance issue.
Apart form that, your fix works great. I primarily see three approaches:
And I dont really like any of them, and number 4 I dont know if is very doable at all. What would you prefer, strictly from the usage side?
i think it should be like:
$this->_render['type']
(on a per action basis, or even better filterable)i don't know if this sounds reasonable, i tried to cover the major use-cases.
i'm new to li3 so please forgive me if i overlooked something, but i installed both li3_twig and li3_docs plugins and after activating twig everything disappeared as it replaces the default handler (when registering the media type in boostrap). i created a short workaround to be able to use the old default config and use twig if a template is presented, however i think the right approach would be to get the View/Media check the presented templates, eg. one could register multiple templating engines and the View/Media should pick the right one (based on preference and presence). i'm not sure where to stick this logic and how to make the configuration convenient. another point would be to support mixed types (eg. simple php layout with twig template).