cphalcon
cphalcon copied to clipboard
Volt path in extend
If you extend a template in volt like
{% extends 'layouts/main.volt' %}
you will get an error that the template is not found. If you hard code the full path it works. It also works if you change it to (assuming your application is under app)
{% extends '../app/views/layouts/main.volt' %}
Volt should look at the registered views folder first to discover those areas.
Alternatively it would be nice if we could have constants parsing in those declarations, something like
{% extends ROOT_PATH ~ '/app/views/layouts/main.volt' %}
+1
Then i guess not.
Actually that was on me, relative paths work just fine now. Nevermind