Modify default HTML produced by „baked“ templates

If you wish to modify the default HTML output produced by the „bake“ command, follow these simple steps:

For baking custom views:

  1. Go into: cake/console/templates/default/views

  2. Notice the 4 files there

  3. Copy them to your: app/vendors/shells/templates/[themename]/views

  4. Make changes to the HTML output to control the way „bake“ builds your views

The [themename] path segment should be the name of the bake theme that you are creating. Bake theme names need to be unique, so don’t use ‚default‘.

For baking custom projects:

  1. Go into: cake/console/templates/skel

  2. Notice the base application files there

  3. Copy them to your: app/vendors/shells/templates/skel

  4. Make changes to the HTML output to control the way „bake“ builds your views

  5. Pass the skeleton path parameter to the project task

    cake bake project -skel vendors/shells/templates/skel
    

Notes

  • You must run the specific project task cake bake project so that the path parameter can be passed.

  • The template path is relative to the current path of the Command Line Interface.

  • Since the full path to the skeleton needs to be manually entered, you can specify any directory holding your template build you want, including using multiple templates. (Unless Cake starts supporting overriding the skel folder like it does for views)