PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, October 18, 2022

[FIXED] Where to save your TWIG templates in Symfony framework

 October 18, 2022     symfony, twig     No comments   

Issue

What is the best place to keep your TWIG template and why?

app/Resources/views folder

or

YourBundle/Resources/views

Solution

Traditionally, Symfony developers stored the application templates in the Resources/views/ directory of each bundle. Then they used the logical name to refer to them (e.g. AcmeDemoBundle:Default:index.html.twig).

But for the templates used in your application, it's much more convenient to store them in the app/Resources/views/ directory. Syfmony Documentation

  • In Symfony 2, auto generated twig files were located in YourBundle/Resources/views
  • In Symfony 3, auto generated twig files are located in app/Resources/views


Answered By - niyasc
Answer Checked By - Mary Flores (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing