Closed bgrinter closed 2 years ago
To overwrite the default layout you have 2 options
templates/layout
, and then in the AppView
change the $layout
public $layout = 'default';
templates/plugin/CakeLte/layout/default.php
https://book.cakephp.org/4/en/plugins.html#overriding-plugin-templates-from-inside-your-applicationa third option would be, that you make a pull request adding the strip_tags
Thanks - I had tried previously in templates layout but didn't work. The second options worked perfect!
Not sure if I'm doing this right. I had added an Icon on the page title e.g.
$this->assign('title', '<i class="nav-icon fas fa-user-cog"></i> Users');
However as this is also used in the page title I see this in the page title
Is this the correct way to do this?
Adding strip_tags to the title should fix this
<title><?= strip_tags($this->fetch('title')) . ' | ' . strip_tags($this->CakeLte->getConfig('app-name')) ?></title>
Is it possible to override the default in the plugin with my own? I tries added a copy to src/templates/layout but didn't work.