Hi,
for our latest project we used Django, where one can specify a list of folders, that are searched for a template, say, with name example.html
. Now, we switched back to Smarty (PHP) and are wondering, if there is something similar.
Smarty version: Can be cutting-edge.
Behaviour:
- Feed Smarty with an array of folders.
- Call a template either with
$smarty->display()
or{include}
. - Smarty searches through the folders and takes the first template matching the name.
I looked at Smarty resources, but they look like overkill for this task, and the docs are a bit sparse on this topic. Any ideas how this could be done?
An additional problem is, that the list of folders may change depending on the requested URL. Any ideas how to tell Smarty, which compiled template to use?
Cheers,