This document is for a version of CakePHP that is no longer supported. Please upgrade to a newer release!

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/libs/templates/views

  2. Notice the 4 files there

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

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

For baking custom projects:

  1. Go into: cake/console/libs/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)