Merge pull request #2653 from sbwalker/dev

include documentation to explain logic
This commit is contained in:
Shaun Walker 2023-03-08 12:09:25 -05:00 committed by GitHub
commit c0341798ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,6 +124,10 @@
editmode = PageState.EditMode;
lastsyncdate = PageState.LastSyncDate;
}
if (PageState?.Page.Path != route.PagePath)
{
editmode = false; // reset edit mode when navigating to different page
}
// get user
if (PageState == null || refresh || PageState.Alias.SiteId != SiteState.Alias.SiteId)
@ -187,11 +191,6 @@
page = PageState.Page;
}
if (PageState?.Page.Path != route.PagePath)
{
editmode = false;
}
if (page == null && route.PagePath == "") // naked path refers to site home page
{
if (site.HomePageId != null)