I am using Code Igniter, The HMVC library, and Smarty with this library.
Smarty is working fine by default, however if I try to use smarty's inheritance feature ( {extends file="master.tpl"}
) then we run into an issue.
The extends feature does not look in the module views folder for the extended file (in the above's case master.tpl
), instead it only looks in the application/views/
folder and throws an error if it cannot find it.
I could add APPPATH."modules/smartytest/views"
to the $config['template_directory']
array in the smarty config file. but that throws an error for each item in the array it checks first for the file. filemtime(): stat failed for application/views/master.tpl
and that has the added issue of, if I have three modules all the the array and the modules all have a master.tpl then no matter what module I call the extend from it will load the first one found.
So, is there a way to get smarty's extend function to behave nicely with the HMVC modules?