Browse Source

Fixed page title not showing 'create/edit' when creating or editing a post.

Teknikode 1 year ago
parent
commit
e345535389
2 changed files with 5 additions and 5 deletions
  1. 1
    1
      GitVersionConfig.yaml
  2. 4
    4
      Teknik/Areas/Blog/Controllers/BlogController.cs

+ 1
- 1
GitVersionConfig.yaml View File

@@ -1,2 +1,2 @@
1 1
 assembly-versioning-scheme: MajorMinorPatch
2
-next-version: 2.0.5
2
+next-version: 2.0.6

+ 4
- 4
Teknik/Areas/Blog/Controllers/BlogController.cs View File

@@ -132,7 +132,7 @@ namespace Teknik.Areas.Blog.Controllers
132 132
                 model = new BlogViewModel(blog);
133 133
                 if (blog.User.Username == Constants.SERVERUSER)
134 134
                 {
135
-                    ViewBag.Title = model.Title + " - " + Config.BlogConfig.Title + " - " + Config.Title;
135
+                    ViewBag.Title = "Create Post - " + Config.BlogConfig.Title + " - " + Config.Title;
136 136
                     ViewBag.Description = Config.BlogConfig.Description;
137 137
                 }
138 138
                 else
@@ -142,7 +142,7 @@ namespace Teknik.Areas.Blog.Controllers
142 142
                     {
143 143
                         ViewBag.Title = blog.User.BlogSettings.Title + " - " + ViewBag.Title;
144 144
                     }
145
-                    ViewBag.Title = model.Title + " - " + ViewBag.Title;
145
+                    ViewBag.Title = "Create Post - " + ViewBag.Title;
146 146
                     ViewBag.Description = blog.User.BlogSettings.Description;
147 147
                 }
148 148
                 return View("~/Areas/Blog/Views/Blog/NewPost.cshtml", model);
@@ -168,7 +168,7 @@ namespace Teknik.Areas.Blog.Controllers
168 168
 
169 169
                 if (post.System)
170 170
                 {
171
-                    ViewBag.Title = model.Title + " - " + Config.BlogConfig.Title + " - " + Config.Title;
171
+                    ViewBag.Title = "Edit Post - " + model.Title + " - " + Config.BlogConfig.Title + " - " + Config.Title;
172 172
                     ViewBag.Description = Config.BlogConfig.Description;
173 173
                 }
174 174
                 else
@@ -178,7 +178,7 @@ namespace Teknik.Areas.Blog.Controllers
178 178
                     {
179 179
                         ViewBag.Title = post.Blog.User.BlogSettings.Title + " - " + ViewBag.Title;
180 180
                     }
181
-                    ViewBag.Title = model.Title + " - " + ViewBag.Title;
181
+                    ViewBag.Title = "Edit Post - " + model.Title + " - " + ViewBag.Title;
182 182
                     ViewBag.Description = post.Blog.User.BlogSettings.Description;
183 183
                 }
184 184
                 return View("~/Areas/Blog/Views/Blog/EditPost.cshtml", model);

Loading…
Cancel
Save