mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
Adding something for the page title to the core document template (and widget shape template)*
*exploration work --HG-- branch : dev
This commit is contained in:
@@ -8,7 +8,6 @@ using System.Web.Mvc;
|
||||
using System.Web.Mvc.Html;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.DisplayManagement.Descriptors;
|
||||
using Orchard.DisplayManagement.Implementation;
|
||||
using Orchard.Settings;
|
||||
using Orchard.UI;
|
||||
using Orchard.UI.Resources;
|
||||
|
@@ -4,12 +4,18 @@
|
||||
RegisterLink(new LinkEntry {Type = "image/x-icon", Rel = "shortcut icon", Href = Url.Content("~/modules/orchard.themes/Content/orchard.ico")});
|
||||
//todo: (heskew) get conditions (as in conditional comments) hooked up for script tags too
|
||||
Script.Include("html5.js").AtLocation(ResourceLocation.Head);
|
||||
|
||||
//a bit opinionated - only the site name on the homepage
|
||||
var title = (Request.Path != Request.ApplicationPath && !string.IsNullOrWhiteSpace((string)Model.Title)
|
||||
? Model.Title + WorkContext.CurrentSite.PageTitleSeparator
|
||||
: "") +
|
||||
WorkContext.CurrentSite.SiteName;
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="static @Html.ClassForPage()">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>@Model.Title</title>
|
||||
<title>@title</title>
|
||||
@Display(Model.Head)
|
||||
<script>(function(d){d.className="dyn"+d.className.substring(6,d.className.length);})(document.documentElement);</script>
|
||||
</head>
|
||||
|
@@ -1,4 +1,7 @@
|
||||
@if(Model.Content != null) {
|
||||
@{
|
||||
Layout.Title = Model.Title;
|
||||
}
|
||||
@if(Model.Content != null) {
|
||||
<article>
|
||||
@if(Model.Header != null) {
|
||||
<header>
|
||||
|
@@ -11,7 +11,6 @@ using Orchard.Mvc.Spooling;
|
||||
using Orchard.Security;
|
||||
using Orchard.Security.Permissions;
|
||||
using Orchard.UI.Resources;
|
||||
using TagBuilder = System.Web.Mvc.TagBuilder;
|
||||
|
||||
namespace Orchard.Mvc.ViewEngines.Razor {
|
||||
|
||||
|
Reference in New Issue
Block a user