0
votes

I am trying to override the template file for the environment panel in the CakePHP 3.0 DebugKit. The file is located at

app/vendor/cakephp/debug_kit/src/Template/Element/environment_panel.ctp

According to the docs, placing my own file at

app/src/Template/Plugin/cakephp/debug_kit/Element/environment_panel.ctp

should automagically display my template instead of the plugin's, however, my file is being ignored. I've tried leaving out the cakephp directory, and using camel case for the vendor/plugin names. What am I doing wrong?

1

1 Answers

0
votes

After two more hours of experimentation I found the correct path:

app/src/Template/Plugin/DebugKit/Element/environment_panel.ctp

To clarify the confusion I had: the debug kit is not considered a composer/vendor-type plugin mentioned in the docs I linked in the question, so it doesn't need the ../cakephp/.. intermediate directory.

Additionally, the directory needed to be CamelCased instead of copied verbatim from the vendor directories.

ALSO: in apparent conflict with the Element docs, you CAN override a plugin element without setting the ['plugin' => false] option.