fix some bad error printing
+ fixed "blog" not being highlighted in admin sidebar when visited
This commit is contained in:
parent
b7c1d85830
commit
84e40b837a
5 changed files with 29 additions and 27 deletions
|
|
@ -81,6 +81,7 @@ func serveBlogIndex(app *model.AppState) http.Handler {
|
|||
|
||||
err = templates.BlogsTemplate.Execute(w, blogsData{
|
||||
AdminPageData: core.AdminPageData{
|
||||
Path: r.URL.Path,
|
||||
Session: session,
|
||||
},
|
||||
TotalPosts: len(posts),
|
||||
|
|
@ -118,6 +119,7 @@ func serveBlogPost(app *model.AppState) http.Handler {
|
|||
|
||||
err = templates.EditBlogTemplate.Execute(w, blogPostData{
|
||||
AdminPageData: core.AdminPageData{
|
||||
Path: r.URL.Path,
|
||||
Session: session,
|
||||
},
|
||||
Post: post,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue