【问题标题】:Change admin dashboard in Orchard在 Orchard 中更改管理仪表板
【发布时间】:2020-01-29 03:20:34
【问题描述】:

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

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

        return null;
    }
}

我已将此行添加到 Theme.txt

基本主题:TheAdmin

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

【问题讨论】:

    标签: asp.net-core-mvc orchardcms dashboard


    【解决方案1】:

    您很可能需要您的管理主题也是一个项目,所以当您使用 orchard 命令行创建主题时,您希望使用如下内容:

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

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

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

    【讨论】:

      猜你喜欢
      • 2013-05-22
      • 1970-01-01
      • 1970-01-01
      • 2022-10-05
      • 2023-03-10
      • 2019-09-01
      • 2016-07-02
      • 2021-12-05
      • 1970-01-01
      相关资源
      最近更新 更多