Document model : render the same text in //head/title and //body/h1

See UserPost to customize the title
This commit is contained in:
Paul Schneider
2014-09-24 13:52:09 +02:00
parent 8fee293665
commit 4c6fbd29a5
5 changed files with 28 additions and 19 deletions

View File

@ -7,10 +7,13 @@
<link rel="stylesheet" href="/style.css"/>
<link rel="icon" type="image/png" href="/favicon.png" />
<link href='http://fonts.googleapis.com/css?family=Dancing+Script:400,700' rel='stylesheet' type='text/css'/>
<asp:ContentPlaceHolder id="init" runat="server"></asp:ContentPlaceHolder>
<asp:ContentPlaceHolder ID="title" runat="server">
<title>
<asp:ContentPlaceHolder ID="titleContent" runat="server" />
<%= Page.Title %>
<asp:Literal runat="server" Text=" - " /><%= YavscHelpers.SiteName %>
</title>
</asp:ContentPlaceHolder>
<asp:ContentPlaceHolder ID="head" runat="server"></asp:ContentPlaceHolder>
</head>
<body>
@ -30,11 +33,21 @@
<% } %>
<%= Html.ActionLink( "Accueil", "Index", "Home" ) %>
</div>
<asp:ContentPlaceHolder ID="header" runat="server">
<h1><a href="/"> <%=Html.Encode(YavscHelpers.SiteName)%> </a></h1>
<asp:ContentPlaceHolder ID="overHeaderOne" runat="server">
<h1><a href="<%= Html.Encode(Request.Url.AbsoluteUri.ToString()) %>">
<%= Page.Title %>
</a>
<asp:Literal runat="server" Text=" - " />
<a href="/"> <%= YavscHelpers.SiteName %> </a>
</h1>
</asp:ContentPlaceHolder>
<% if (ViewData["Error"]!=null) { %>
<div class="Error">
<%= Html.Encode(ViewData["Error"]) %>
@ -45,6 +58,8 @@
<%= Html.Encode(ViewData["Message"]) %>
</div>
<% } %>
<asp:ContentPlaceHolder ID="header" runat="server">
</asp:ContentPlaceHolder>
</header>
<main>