Themes

    To use themes, set the theme name in your controller’s action or callback:

    For example, the view file for an edit action of a Posts controller would resideat plugins/Modern/src/Template/Posts/edit.ctp. Layout files would reside inplugins/Modern/src/Template/Layout/. You can provide customized templatesfor plugins with a theme as well. If you had a plugin named ‘Cms’, thatcontained a TagsController, the Modern theme could provideplugins/Modern/src/Template/Plugin/Cms/Tags/edit.ctp to replace the edittemplate in the plugin.

    If your theme also acts as a plugin, don’t forget to ensure it is loaded inyour application’s method. For example:

    All of CakePHP’s built-in helpers are aware of themes and will create thecorrect paths automatically. Like template files, if a file isn’t in the themefolder, it will default to the main webroot folder: