0

I searched everywhere but unfortunately without result. The case is as following: I'm using a general Symfony 4 codebase with basic TWIG template files. Next to that i have multiple domains who refer to the codebase, because of that reason I want to set the path to my TWIG files in the controller from my codebase: return $this->render("path/to/domain/and/twig/temp", "domain variables");

This is not working and I can't find how to change my TWIG path withing my controller. Can somebody help with this?

Thanks!

1
  • Have you found a solution for this issue in the meantime? Commented Jul 17, 2020 at 16:42

1 Answer 1

2

Symfony uses app/Resources/views/ directory for templates. If you want to change you can configure it in config.yml as below.

twig:
    # ...
    paths: ["%kernel.project_dir%/templates"]
Sign up to request clarification or add additional context in comments.

1 Comment

Found that but I want to use that as original/fallback and also use a different path for each seperate domain (example: /var/www/codebase/templates for the codebase and /var/www/domain/templates for domains)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.