TwigBridge icon indicating copy to clipboard operation
TwigBridge copied to clipboard

Twig view.html.twig naming

Open stevelacey opened this issue 6 years ago • 1 comments

Any way to getting the naming such as view.html.twig working?

The standard view('index') with index.twig works, but the intermediary extension carries value when you're using Twig to build things other than HTML.

Seems like no combo of including .html in the view call will work, and setting .html.twig as the extension in twigbridge conf somewhat defaults the objective given then all you can build is html.

Also, all solutions I've attempted render extends within twig templates incorrect – in a standalone twig setup full filenames are used in extends and I think the design here is to omit the .twig? Again it would be good to not require this change, so that standalone Twig can still render these.

stevelacey avatar Oct 11 '18 17:10 stevelacey

You could set the extension variable in the twigbridge.php config file. But why whould such a structure be that important to you? Wouldn't it be easier to split such templates in a html directory where you want to compile something other than HTML?

jayked avatar Mar 11 '20 15:03 jayked