I'm trying to create a sidebar in my template but I'm getting Cake\View\Exception\MissingElementException. I've created sidebar.ctp in /src/View/Element/ directory, and call it like this :
<?= $this->element('sidebar') ?>
How can I fix this ?
Check the docs a little more closely, template files belong into the
Templatedirectory, not theViewdirectory.See Cookbook > Views > Elements