Merge pull request #3886 from sbwalker/dev

fix #3868 - add data-enhance.nav attribute
This commit is contained in:
Shaun Walker 2024-02-24 09:09:40 -05:00 committed by GitHub
commit 3ed6f360da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 6 deletions

View File

@ -179,9 +179,12 @@
<Label Class="col-sm-3" For="container" HelpText="Select the default container for the page" ResourceKey="DefaultContainer">Default Container: </Label>
<div class="col-sm-9">
<select id="container" class="form-select" @bind="@_containertype" required>
@foreach (var container in _containers)
@if (_containers != null)
{
<option value="@container.TypeName">@container.Name</option>
foreach (var container in _containers)
{
<option value="@container.TypeName">@container.Name</option>
}
}
</select>
</div>

View File

@ -13,7 +13,7 @@
{
_attributes.Add("target", _target);
}
if (!string.IsNullOrEmpty(childPage.ThemeType))
if (PageState.RenderMode == RenderModes.Static && PageState.Page.ThemeType != (string.IsNullOrEmpty(childPage.ThemeType) ? PageState.Site.DefaultThemeType : childPage.ThemeType))
{
_attributes.Add("data-enhance-nav", "false");
}
@ -50,7 +50,7 @@ else
{
_attributes.Add("target", _target);
}
if (!string.IsNullOrEmpty(childPage.ThemeType))
if (PageState.RenderMode == RenderModes.Static && PageState.Page.ThemeType != (string.IsNullOrEmpty(childPage.ThemeType) ? PageState.Site.DefaultThemeType : childPage.ThemeType))
{
_attributes.Add("data-enhance-nav", "false");
}

View File

@ -12,7 +12,7 @@
{
_attributes.Add("target", _target);
}
if (!string.IsNullOrEmpty(childPage.ThemeType))
if (PageState.RenderMode == RenderModes.Static && PageState.Page.ThemeType != (string.IsNullOrEmpty(childPage.ThemeType) ? PageState.Site.DefaultThemeType : childPage.ThemeType))
{
_attributes.Add("data-enhance-nav", "false");
}
@ -56,7 +56,7 @@ else
{
_attributes.Add("target", _target);
}
if (!string.IsNullOrEmpty(childPage.ThemeType))
if (PageState.RenderMode == RenderModes.Static && PageState.Page.ThemeType != (string.IsNullOrEmpty(childPage.ThemeType) ? PageState.Site.DefaultThemeType : childPage.ThemeType))
{
_attributes.Add("data-enhance-nav", "false");
}