cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

Volt path in extend

Open niden opened this issue 14 years ago • 3 comments

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' %}

niden avatar Nov 22 '12 03:11 niden

+1

eugene-p avatar Nov 22 '12 18:11 eugene-p

Then i guess not.

Jurigag avatar Oct 29 '16 15:10 Jurigag

Actually that was on me, relative paths work just fine now. Nevermind

andmm avatar Oct 29 '16 15:10 andmm