fix #1713 - link to home path displays login page
This commit is contained in:
parent
9b20006938
commit
7bfc0998fd
@ -240,17 +240,16 @@
|
|||||||
page = PageState.Page;
|
page = PageState.Page;
|
||||||
}
|
}
|
||||||
|
|
||||||
// failsafe in case router cannot locate the home page for the site
|
// get the page if the path has changed
|
||||||
|
if (page == null || page.Path != path)
|
||||||
|
{
|
||||||
|
page = pages.FirstOrDefault(item => item.Path.Equals(path, StringComparison.OrdinalIgnoreCase));
|
||||||
|
// if the home page path does not exist then use the first page in the collection (a future enhancement would allow the admin to specify a home page)
|
||||||
if (page == null && path == "")
|
if (page == null && path == "")
|
||||||
{
|
{
|
||||||
page = pages.FirstOrDefault();
|
page = pages.FirstOrDefault();
|
||||||
path = page.Path;
|
path = page.Path;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if page has changed
|
|
||||||
if (page != null && page.Path != path)
|
|
||||||
{
|
|
||||||
page = pages.Where(item => item.Path == path).FirstOrDefault();
|
|
||||||
editmode = false;
|
editmode = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user