Skip to content

Commit fe480ef

Browse files
ociawdaveaglick
authored andcommitted
Fix failure to render ChildPages when ApiPath has more than one segment (e.g. test/api)
1 parent ff6d777 commit fe480ef

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

input/_Layout.cshtml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
}
7474
@await Html.PartialAsync("_Splash")
7575
@{
76-
string section = Document.Destination.Segments.Length > 1 ? Document.Destination.Segments[0].ToString() : null;
76+
string section = Document.Destination.Segments.Length > 1 ? @Context.GetString(DocsKeys.ApiPath) : null;
7777
IDocument root = OutputPages.Get(section + "/index.html");
7878
}
7979
<div class="flex-grow-1 d-flex flex-column">
@@ -166,6 +166,10 @@
166166
{
167167
IgnoreSection(SectionNames.Sidebar);
168168
}
169+
if (IsSectionDefined(SectionNames.ChildPages))
170+
{
171+
IgnoreSection(SectionNames.ChildPages);
172+
}
169173

170174
<div id="content" class="offset-lg-2 col-12 col-lg-8 p-4 pt-md-0 bg-white">
171175
@* Render the body without indenting in case it contains things like directives *@

0 commit comments

Comments
 (0)