2
votes

In Symfony by default, templates can live in two different locations:

  1. app/Resources/views/
  2. path/to/bundle/Resources/views/

How can you render Templates also from other Locations?

  1. For Example I want my Application Themes be in the web/Themes folder:

web/Layouts/layout.twig.html web/Layouts/layout.less ...

  1. Or just store Templates in a folder in base path:

web/ app/ Themes/ ...

1
maybe this will help you? stackoverflow.com/questions/20050384/…oligan

1 Answers

0
votes

While you can do that as decribed in define custom filesystem path for twig templates, I would not advertise to put them in the web directory. Things in the web directory are publicy available. Raw templates, before parsing should not be publicy available.