I’m trying to add a specific css file from an element to the layout in cakephp but the file doesn’t appear in the source code.
However it works from a static page.
// In the layout
echo $this->element('diaporama_accueil');
// In templates/element/diaporama_accueil.php [NOT WORKING]
$this->Html->css('subtle-slideshow.css', ['block' => true]);
// In templates/Pages/accueil.php [WORKING]
$this->Html->css('subtle-slideshow.css', ['block' => true]);
What’s the problem with doing that in an element ?