Land on Blogs page when SimpleNav is enabled
This shows the Blogs page instead of the Editor to logged in users on the `/` path when the new `simple_nav` config option is enabled. Ref T680
This commit is contained in:
parent
f6a7dfacb9
commit
81847fbbcc
7
app.go
7
app.go
|
@ -193,7 +193,12 @@ func handleViewHome(app *App, w http.ResponseWriter, r *http.Request) error {
|
|||
// Show correct page based on user auth status and configured landing path
|
||||
u := getUserSession(app, r)
|
||||
if u != nil {
|
||||
// User is logged in, so show the Pad
|
||||
// User is logged in, so show the Pad or Blogs page, depending on config
|
||||
if app.cfg.App.SimpleNav {
|
||||
// Simple nav, so home page is Blogs page
|
||||
return viewCollections(app, u, w, r)
|
||||
}
|
||||
// Default config, so home page is editor
|
||||
return handleViewPad(app, w, r)
|
||||
}
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ type (
|
|||
JSDisabled bool `ini:"disable_js"`
|
||||
WebFonts bool `ini:"webfonts"`
|
||||
Landing string `ini:"landing"`
|
||||
SimpleNav bool `ini:"simple_nav"`
|
||||
|
||||
// Users
|
||||
SingleUser bool `ini:"single_user"`
|
||||
|
|
Loading…
Reference in New Issue