From 81847fbbcc66e215c76bf745923836a75631e34f Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Mon, 5 Aug 2019 09:27:51 -0400 Subject: [PATCH] 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 --- app.go | 7 ++++++- config/config.go | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app.go b/app.go index 1fa6f8a..6d6a689 100644 --- a/app.go +++ b/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) } diff --git a/config/config.go b/config/config.go index f46282e..d026a74 100644 --- a/config/config.go +++ b/config/config.go @@ -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"`