是否可以覆盖后端布局?例如后端主菜单(/modules/backend/layouts/_mainmenu.htm)
答案 0 :(得分:1)
当然,问问qustion之后解决方案就出现了。所以就是这样。
默认情况下,您只能更改用于后端的外观。因此,要扩展它,首先需要创建一个扩展默认后端皮肤信息文件的新类(/modules/backend/skins/Standard.php)
<?php namespace Author\Plugin\Classes;
use Backend\Skins\Standard;
/**
* Modified backend skin information file.
*
* This is modified to include an additional path to override the default layouts.
*
*/
class BackendSkin extends Standard
{
/**
* {@inheritDoc}
*/
public function getLayoutPaths()
{
return [
base_path() . '/plugins/author/plugin/skin/layouts',
$this->skinPath . '/layouts'
];
}
}
现在您可以将现有布局复制到该文件夹并根据需要进行修改。