Hi all, How to get file name use Volt template? ex: In file test.volt ---> {{ FILE }} -> result: test
Hi @thanhansoft do you try with {{ dump(voltService) }} probably there you can find the file name... Good luck
{{ dump(voltService) }}
Thanks for reply, It's not work
{{ voltService.getCompiler().getTemplatePath() }}
This will return the full path of the current template, you would probably want to create a filter/function in volt to parse it properly.