Closed skyosev closed 9 years ago
@skyosev Thanks for your interest in Foil.
In Foil ext
param matches what is returned by pathinfo()
as extension.
So, if a file is named home.tpl.php
at the moment to render it you need
I'm agree that it can be a nice addition to Foil, I'll implement it in next release that will be released soon (0.3 branch it's already live). Thanks!
Cool, it will be good enchantment I think.
I'm starting new ecommerce project (native php template requirements) right now and Foil seems great alternative to Plates (at first sight at least). Will watch its development closely.
@skyosev What I said in previous comment is completely wrong. facepalm
Foil is already capable to do that. Problem with your code is that ext
must be set as string.
Real issue is in documentation, going to fix it immediately.
If you use:
$engine = Foil\engine([
'ext' => 'tpl.php',
'folders' => ['path/to/templates']
]);
$engine->render('home');
it works!
In 0.3 branch I added 2 tests: unit and functional to test this feature.
this produces
Do I miss something or this is currently not possible with Foil ?