更改果园中的管理仪表板



我想更改Orchard管理仪表板,但我无法这样做。我已将此代码添加到.CS文件中

public class AdminOverride : IThemeSelector
{
public ThemeSelectorResult GetTheme(RequestContext context)
{
if (AdminFilter.IsApplied(context))
{
return new ThemeSelectorResult { Priority = 111, ThemeName
= "NewAdminTheme" };
}
return null;
}
}

我已将此行添加到主题中.txt

基本主题: 管理员

但没有什么对我有用 我是果园的初学者,不幸的是我找不到帮助我的教程。 提前非常感谢

很可能你需要你的管理主题也是一个项目,所以当你使用果园命令行创建你的主题时,你想使用如下的东西:

codegen theme NewAdminTheme /BasedOn:TheAdmin /CreateProject:true /IncludeInSolution:true

然后,您可以在站点的"主题"部分中激活主题(不要将其设置为当前主题,因为它基本上仅在管理页面上自行激活(。

您可以在此处获取有关生成主题的更多详细信息 https://docs.orchardproject.net/en/latest/Documentation/Customizing-the-default-theme/#generating-the-theme-structure

最新更新