Is there a way of including a slot from generator.yml in Symfony? I would like to add a piece of HTML code only within some backend modules, and slots is the best idea I can come up with.

If not with generator.yml, how can I achieve this?

Thanks!

有帮助吗?

解决方案

Probably the easiest way to achieve this is to override the generated templates.

The admin generator generates templates based on generator.yml. You can view these generated templates in /cache/<app>/<env>/modules/<module>/templates.

If you view the files in this folder, you can just override them in the templates folder of your own module (not in the cache folder!). Just copy one of the files from the cache folder to the template folder of your module and start editing.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top