0

Can anyone tell me where/how to save the new bake template for prefix routing? When I bake a controller with --prefix Admin it creates the Controller/Admin/controller.php file from the Template/Bake/Controller/controller.php file instead of from the Template/Bake/Controller/Admin/controller.php file. But I want different code generated in the main controller and in the Admin/controller.

Lucky
  • 95
  • 1
  • 7
  • Bake Admin plugin with MVC structure – Salines Aug 04 '16 at 08:35
  • But where to save the bake template files for the admin controller and views then? – Lucky Aug 04 '16 at 08:38
  • plugins/Admin/src/Template/Bake/Template/. read more at http://book.cakephp.org/3.0/en/bake/development.html#creating-a-bake-theme – Salines Aug 04 '16 at 08:44
  • I'm asking myself if it's a good idea to create a separate Admin plugin because: 1. The admin pages are an inherent part of the main (CMS-) system; and 2. All plugins I need to create will all have front- and back-end (admin) pages. Does this mean for each plugin I need to create 2 plugins, 1 for the frontend and one for the admin? And does the Plugin's Admin plugin then be placed within the Plugin's plugin folder of within the main Admin plugin's plugin folder? – Lucky Aug 04 '16 at 08:55
  • I do not know what you are planning, but if you need a separated admin bake template, then create "AdminBake" plugin and there save your custom bake template. Then use this bake template to create prefixed controllers, etc. where you want. – Salines Aug 04 '16 at 09:12

0 Answers0