开发者

Including slots in auto-generated admin modules with Symfony

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 c开发者_如何学Pythonan 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜