Answer the question
In order to leave comments, you need to log in
How to completely get rid of bundles in symfony templates and translations?
At the suggestion of the esteemed Sergey Protko , he decided to use this approach in the application: elnur.pro/symfony-without-bundles
This is especially convenient after the number of bundles exceeded 10.
Everything is fine, but I can't figure out the templates and translations.
Now this is the structure:
acme.com
app
config
Resources
translations
Backend
ru
...
en
...
Dashboard
ru
en
Frontend
ru
en
Shop
ru
en
...
views
App
Exception
Backend
...
Dashboard
...
Frontend
...
Shop
Product
list.html.twig
_list.html.twig
_list-item.html.twig
ProductBrand
ProductCategory
...
src
Dodo
AppBundle
Controller
Backend
UsersController.php
SecurityController.php
Dashboard
...
SecurityController.php
Frontend
PageController.php
Shop
ProductController.php
ProductBrandController.php
ProductCategoryController.php
DependencyInjection
Resources
config
doctrine
backend
admin.orm.yml
dashboard
client.yml
shop
Product.yml
ProductBrand.yml
ProductCategory.yml
routing
backend
user.orm.yml
security.orm.yml
routing.yml
dashboard
security.yml
routing.yml
frontend
page.yml
routing.yml
shop
product.yml
product.brand.yml
product.category.yml
routing.yml
services
dashboard.yml
backend.yml
twig.yml
...
validation
...
Security
Backend
Dashboard
Entity
Backend
...
Dashboard
...
Shop
Product.php
ProductBrand.php
ProductCategory.php
Model
Backend
...
Dashboard
...
Shop
Product.php
ProductBrand.php
ProductCategory.php
...
Answer the question
In order to leave comments, you need to log in
For example, now in the controller you have to write crutches like :Dashboard/Security:login.html.twig - why do you think this is a crutch? And if you need to load a template from somewhere else, how do you do it with your structure?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question