From 76608e64427ff4d89344c224ffb646009d8c99f2 Mon Sep 17 00:00:00 2001 From: alexmg Date: Mon, 3 Aug 2020 03:24:41 +1000 Subject: [PATCH] Special treatment for Tags and Archive pages --- input/_header.cshtml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/input/_header.cshtml b/input/_header.cshtml index 8414930..0354867 100644 --- a/input/_header.cshtml +++ b/input/_header.cshtml @@ -5,17 +5,17 @@ backgroundImage = $"background-image: url(\"{Context.GetLink(Document.GetString(WebKeys.Image))}\")"; } string description = Document.WithoutSettings().GetString("Lead") ?? Document.WithoutSettings().GetString(WebKeys.Description); - bool isPost = Document.GetBool("IsPost"); - string headerTitle = isPost ? Document.GetString("Title") : Document.GetString("SiteTitle"); + string title = Document.GetString("Title") ?? Document.GetString("SiteTitle"); + bool isPost = Document.GetBool("IsPost") && title != "Tags" && title != "Archive"; }
-
+

- @headerTitle + @title @if (Document.GetInt(Keys.Index) > 1) { (Page @Document.GetString(Keys.Index)) @@ -25,7 +25,7 @@ {

@description

} - @if (@isPost) + @if (isPost) { // This is a blog post so show extra data
Published on @Document.GetDateTime(WebKeys.Published).ToLongDateString()