Including a non-twig file from twig

前端 未结 4 1803
粉色の甜心
粉色の甜心 2021-02-14 19:51

I need to include the contents of a file (inside my resources folder) inside a Twig template.

I have tried this with no luck:

{% include \'public/directo         


        
4条回答
  •  逝去的感伤
    2021-02-14 20:44

    I made a bundle just for this some time ago. It's pretty much a wrapper for file_get_contents.

    The setup can be found here.

提交回复
热议问题