Skip to content

Commit 039dbc9

Browse files
committed
Only render hx node if the navigationFilename is not empty
1 parent 2eacfcc commit 039dbc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Elastic.Documentation.Site/Layout/_PagesNav.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@inherits RazorSlice<Elastic.Documentation.Site.GlobalLayoutViewModel>
22
<aside class="sidebar bg-white fixed md:sticky shadow-2xl md:shadow-none left-[100%] group-has-[#pages-nav-hamburger:checked]/body:left-0 bottom-0 md:left-auto pl-6 md:pl-2 top-[calc(var(--offset-top)+1px)] w-[80%] md:w-auto shrink-0 border-r-1 border-r-grey-20 z-40 md:z-auto">
33

4-
@if (Model.Features.LazyLoadNavigation)
4+
@if (Model.Features.LazyLoadNavigation && !string.IsNullOrEmpty(Model.NavigationFileName))
55
{
66
<div hx-get="@(Model.UrlPathPrefix?.TrimEnd('/') + "/" + Model.NavigationFileName)" hx-trigger="load" hx-params="nav" hx-push-url="false" hx-swap="innerHTML" hx-target="#pages-nav"></div>
77
}

0 commit comments

Comments
 (0)