fix #3868 - add data-enhance.nav attribute

This commit is contained in:
sbwalker
2024-02-24 09:09:15 -05:00
parent 99e032eeb7
commit 9f07f6441a
3 changed files with 9 additions and 6 deletions

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");
}