Skip to content

Commit df4db2f

Browse files
committed
Fix manage views layout
1 parent 5079f70 commit df4db2f

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/UI/Areas/Identity/Pages/Account/Manage/_Layout.cshtml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
@{
2-
Layout = "/Areas/Identity/Pages/_Layout.cshtml";
2+
if (ViewData.TryGetValue("ParentLayout", out var parentLayout))
3+
{
4+
Layout = (string)parentLayout;
5+
}
6+
else
7+
{
8+
Layout = "/Areas/Identity/Pages/_Layout.cshtml";
9+
}
310
}
411

512
<h2>Manage your account</h2>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@{
2+
if (Layout != "_Layout")
3+
{
4+
ViewData["ParentLayout"] = Layout;
5+
Layout = "./_Layout.cshtml";
6+
}
7+
}

0 commit comments

Comments
 (0)