果园cms为什么页面标题为空?

时间:2019-05-11 09:28:14

标签: asp.net-mvc orchardcms

我使用果园cms版本1.10.2 显示了我的管理控制台页面标题。但是我的网页(ui)标题是empth.i trace document.cshtml(标题变量),结果是:打开管理仪表盘时,标题具有价值。但是当打开用户网页(ui)时,该值为空,并且不会显示在浏览器标签的标题中。

为什么我的页面标题为空?

我确定页面标题已保存在数据库中,因为它显示在管理控制台>内容中。

@using Orchard.Localization
@using Orchard.Mvc.Html;
@using Orchard.UI.Resources;

@{
    RegisterLink(new LinkEntry { Type = "image/x-icon", Rel = "shortcut icon", Href = Url.Content("~/modules/orchard.themes/Content/orchard.ico") });
    Script.Require("Html5Shiv").UseCondition("lt IE 9").AtHead();
    string title = Convert.ToString(Model.Title);
    string siteName = Convert.ToString(WorkContext.CurrentSite.SiteName);
    bool isRtl = WorkContext.CurrentCultureInfo().TextInfo.IsRightToLeft;
    Html.AddPageClassNames("dir-" + (isRtl ? "rtl" : "ltr"));
}
<!DOCTYPE html>
<html lang="@WorkContext.CurrentCulture" class="static @Html.ClassForPage()" dir="@(isRtl?"rtl":"ltr")">
<head>
    <meta charset="utf-8" />
    <title>@Html.Title(title, siteName)</title>
    @Display(Model.Head)
    <script>(function (d) { d.className = "dyn" + d.className.substring(6, d.className.length); })(document.documentElement);</script>
    <script>window.isRTL = @(isRtl.ToString().ToLowerInvariant());</script>
</head>
<body>
    @* Layout (template) is in the Body zone @ the default position (nothing, zero, zilch) *@
    @Display(Model.Body)
    @Display(Model.Tail)
</body>
</html>

请告诉我页面加载的开始位置。我可以从中追踪

0 个答案:

没有答案
相关问题