Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4a1ca0f
Introduction of settings necessary for an MVC Pipeline
donker May 22, 2026
e87fbdd
Update DNN Platform/Library/Services/Upgrade/Upgrade.cs
donker May 27, 2026
a32d670
Update Dnn.AdminExperience/Dnn.PersonaBar.Extensions/admin/personaBar…
donker May 27, 2026
9feeef5
Update Dnn.AdminExperience/Dnn.PersonaBar.Extensions/admin/personaBar…
donker May 27, 2026
c206616
Update Dnn.AdminExperience/Dnn.PersonaBar.Extensions/admin/personaBar…
donker May 27, 2026
846589c
Update DNN Platform/Library/Data/DataProvider.cs
donker May 27, 2026
4202307
Update DNN Platform/Library/Data/DataProvider.cs
donker May 27, 2026
11bc0fb
Add overload
donker May 27, 2026
044a410
Change pipeline type to an enum
donker May 27, 2026
325616e
Reshuffle code
donker May 27, 2026
9cbb27c
Make the page pipeline setting a column on the tabs table
donker May 31, 2026
06fa7c0
Merge branch 'develop' into feature/mvc-pipeline-settings
donker Jun 4, 2026
9004c9c
Increase version of IPortalSettings interface
donker Jun 4, 2026
ddea5b1
Move method from interface to extension method
donker Jun 4, 2026
3b29b60
Update DNN Platform/Library/Common/Utilities/UrlUtils.cs
donker Jun 9, 2026
cc87fbf
Update DNN Platform/Library/Common/Utilities/UrlUtils.cs
donker Jun 9, 2026
d40577c
Update DNN Platform/Library/Common/Utilities/UrlUtils.cs
donker Jun 9, 2026
6aa8bb5
Update DNN Platform/Library/Common/Utilities/UrlUtils.cs
donker Jun 9, 2026
ea55281
Update DNN Platform/Library/Common/Utilities/UrlUtils.cs
donker Jun 9, 2026
513207c
Update DNN Platform/Library/Common/Utilities/UrlUtils.cs
donker Jun 9, 2026
91e6ec7
Update DNN Platform/Library/Common/Utilities/UrlUtils.cs
donker Jun 9, 2026
3dd954b
Update DNN Platform/Library/Common/Utilities/UrlUtils.cs
donker Jun 9, 2026
f374941
Revert "Increase version of IPortalSettings interface"
donker Jun 25, 2026
f954049
New approach to the page pipeline setting
donker Jun 25, 2026
c3702a1
Cleaning up
donker Jun 25, 2026
de8daea
Cleaning up 2
donker Jun 25, 2026
6920a6f
Cleaning up 3
donker Jun 25, 2026
3d284ce
Deprecate and overload dataprovider method
donker Jun 28, 2026
90f194b
Fix to mvc site settings controller
donker Jun 28, 2026
901168f
With previous
donker Jun 28, 2026
f467730
Merge branch 'develop' into feature/mvc-pipeline-settings
donker Jun 28, 2026
9b007b4
Merge branch 'develop' into feature/mvc-pipeline-settings
bdukes Jul 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions DNN Platform/DotNetNuke.Abstractions/Framework/PagePipeline.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information

namespace DotNetNuke.Abstractions.Framework
{
/// <summary>
/// Represents the page pipeline configuration for rendering pages in the DNN platform.
/// </summary>
public static class PagePipeline
{
/// <summary>QueryString key.</summary>
public const string QueryStringKey = "pipeline";

/// <summary>QueryString WebForms.</summary>
public const string QueryStringWebForms = "webforms";

/// <summary>QueryString MVC.</summary>
public const string QueryStringMvc = "mvc";

/// <summary>Setting name for the page pipeline configuration.</summary>
public const string SettingName = "DefaultPagePipeline";

/// <summary>
/// Defines the pipeline types for rendering pages in a portal.
/// </summary>
public enum PortalRenderingPipeline
{
/// <summary>
/// Specifies that pages should be rendered using the WebForms pipeline.
/// </summary>
WebForms,

/// <summary>
/// Specifies that pages should be rendered using the MVC pipeline.
/// </summary>
MVC,

/// <summary>
/// Specifies that the pipeline type should be automatically determined.
/// </summary>
Auto,
}

/// <summary>
/// Defines the available pipeline types for rendering pages in the DNN platform.
/// </summary>
public enum PageRenderingPipeline
{
/// <summary>
/// Specifies that the pipeline type should be taken from the portal.
/// </summary>
Inherited = -1,

/// <summary>
/// Specifies that pages should be rendered using the WebForms pipeline.
/// </summary>
WebForms = 0,

/// <summary>
/// Specifies that pages should be rendered using the MVC pipeline.
/// </summary>
MVC = 1,
}
}
}
34 changes: 30 additions & 4 deletions DNN Platform/Library/Data/DataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace DotNetNuke.Data
using System.Web.Hosting;

using DotNetNuke.Abstractions.Application;
using DotNetNuke.Abstractions.Framework;
using DotNetNuke.Common;
using DotNetNuke.Common.Utilities;
using DotNetNuke.ComponentModel;
Expand Down Expand Up @@ -889,7 +890,15 @@ public virtual int SaveTabVersionDetail(int tabVersionDetailId, int tabVersionId
return this.ExecuteScalar<int>("SaveTabVersionDetail", tabVersionDetailId, tabVersionId, moduleId, moduleVersion, paneName, moduleOrder, action, createdByUserID, modifiedByUserID);
}

public virtual void UpdateTab(int tabId, int contentItemId, int portalId, Guid versionGuid, Guid defaultLanguageGuid, Guid localizedVersionGuid, string tabName, bool isVisible, bool disableLink, int parentId, string iconFile, string iconFileLarge, string title, string description, string keyWords, bool isDeleted, string url, string skinSrc, string containerSrc, DateTime startDate, DateTime endDate, int refreshInterval, string pageHeadText, bool isSecure, bool permanentRedirect, float siteMapPriority, int lastModifiedByuserID, string cultureCode, bool isSystem)
[DnnDeprecated(11, 0, 0, "Use UpdateTab with pagePipeline parameter instead.")]
#pragma warning disable SA1601 // Partial elements should be documented
public virtual partial void UpdateTab(int tabId, int contentItemId, int portalId, Guid versionGuid, Guid defaultLanguageGuid, Guid localizedVersionGuid, string tabName, bool isVisible, bool disableLink, int parentId, string iconFile, string iconFileLarge, string title, string description, string keyWords, bool isDeleted, string url, string skinSrc, string containerSrc, DateTime startDate, DateTime endDate, int refreshInterval, string pageHeadText, bool isSecure, bool permanentRedirect, float siteMapPriority, int lastModifiedByuserID, string cultureCode, bool isSystem)
#pragma warning restore SA1601 // Partial elements should be documented
{
this.UpdateTab(tabId, contentItemId, portalId, versionGuid, defaultLanguageGuid, localizedVersionGuid, tabName, isVisible, disableLink, parentId, iconFile, iconFileLarge, title, description, keyWords, isDeleted, url, skinSrc, containerSrc, startDate, endDate, refreshInterval, pageHeadText, isSecure, permanentRedirect, siteMapPriority, lastModifiedByuserID, cultureCode, isSystem, (int)PagePipeline.PageRenderingPipeline.Inherited);
}

public virtual void UpdateTab(int tabId, int contentItemId, int portalId, Guid versionGuid, Guid defaultLanguageGuid, Guid localizedVersionGuid, string tabName, bool isVisible, bool disableLink, int parentId, string iconFile, string iconFileLarge, string title, string description, string keyWords, bool isDeleted, string url, string skinSrc, string containerSrc, DateTime startDate, DateTime endDate, int refreshInterval, string pageHeadText, bool isSecure, bool permanentRedirect, float siteMapPriority, int lastModifiedByuserID, string cultureCode, bool isSystem, int pagePipeline)
Comment thread
donker marked this conversation as resolved.
{
this.ExecuteNonQuery(
"UpdateTab",
Expand Down Expand Up @@ -921,7 +930,8 @@ public virtual void UpdateTab(int tabId, int contentItemId, int portalId, Guid v
siteMapPriority,
lastModifiedByuserID,
this.GetNull(cultureCode),
isSystem);
isSystem,
pagePipeline);
}

public virtual void UpdateTabOrder(int tabId, int tabOrder, int parentId, int lastModifiedByUserID)
Expand Down Expand Up @@ -1329,14 +1339,23 @@ public virtual void UpdateModuleDefinition(int moduleDefId, string friendlyName,
lastModifiedByUserID);
}

public virtual int AddModuleControl(int moduleDefId, string controlKey, string controlTitle, string controlSrc, string iconFile, int controlType, int viewOrder, string helpUrl, bool supportsPartialRendering, bool supportsPopUps, int createdByUserID)
[DnnDeprecated(10, 99, 0, "Use overload with mvcControlClass")]
#pragma warning disable SA1601 // Partial elements should be documented
public virtual partial int AddModuleControl(int moduleDefId, string controlKey, string controlTitle, string controlSrc, string iconFile, int controlType, int viewOrder, string helpUrl, bool supportsPartialRendering, bool supportsPopUps, int createdByUserID)
#pragma warning restore SA1601 // Partial elements should be documented
{
return this.AddModuleControl(moduleDefId, controlKey, controlTitle, controlSrc, null, iconFile, controlType, viewOrder, helpUrl, supportsPartialRendering, supportsPopUps, createdByUserID);
}

public virtual int AddModuleControl(int moduleDefId, string controlKey, string controlTitle, string controlSrc, string mvcControlClass, string iconFile, int controlType, int viewOrder, string helpUrl, bool supportsPartialRendering, bool supportsPopUps, int createdByUserID)
{
return this.ExecuteScalar<int>(
"AddModuleControl",
this.GetNull(moduleDefId),
this.GetNull(controlKey),
this.GetNull(controlTitle),
controlSrc,
this.GetNull(mvcControlClass),
this.GetNull(iconFile),
controlType,
this.GetNull(viewOrder),
Expand All @@ -1356,7 +1375,13 @@ public virtual IDataReader GetModuleControls()
return this.ExecuteReader("GetModuleControls");
}

public virtual void UpdateModuleControl(int moduleControlId, int moduleDefId, string controlKey, string controlTitle, string controlSrc, string iconFile, int controlType, int viewOrder, string helpUrl, bool supportsPartialRendering, bool supportsPopUps, int lastModifiedByUserID)
[DnnDeprecated(10, 99, 0, "Use overload with mvcControlClass")]
#pragma warning disable SA1601 // Partial elements should be documented
public virtual partial void UpdateModuleControl(int moduleControlId, int moduleDefId, string controlKey, string controlTitle, string controlSrc, string iconFile, int controlType, int viewOrder, string helpUrl, bool supportsPartialRendering, bool supportsPopUps, int lastModifiedByUserID)
#pragma warning restore SA1601 // Partial elements should be documented
=> this.UpdateModuleControl(moduleControlId, moduleDefId, controlKey, controlTitle, controlSrc, null, iconFile, controlType, viewOrder, helpUrl, supportsPartialRendering, supportsPopUps, lastModifiedByUserID);

public virtual void UpdateModuleControl(int moduleControlId, int moduleDefId, string controlKey, string controlTitle, string controlSrc, string mvcControlClass, string iconFile, int controlType, int viewOrder, string helpUrl, bool supportsPartialRendering, bool supportsPopUps, int lastModifiedByUserID)
Comment thread
donker marked this conversation as resolved.
{
this.ExecuteNonQuery(
"UpdateModuleControl",
Expand All @@ -1365,6 +1390,7 @@ public virtual void UpdateModuleControl(int moduleControlId, int moduleDefId, st
this.GetNull(controlKey),
this.GetNull(controlTitle),
controlSrc,
this.GetNull(mvcControlClass),
this.GetNull(iconFile),
controlType,
this.GetNull(viewOrder),
Expand Down
9 changes: 9 additions & 0 deletions DNN Platform/Library/Entities/Modules/ControlInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ protected ControlInfo()
/// <returns>A String.</returns>
public string ControlSrc { get; set; }

/// <summary>Gets or sets the Mvc Control Class.</summary>
/// <returns>A String.</returns>
public string MvcControlClass { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the control support the AJAX
/// Update Panel.
Expand All @@ -42,6 +46,7 @@ protected override void FillInternal(IDataReader dr)
base.FillInternal(dr);
this.ControlKey = Null.SetNullString(dr["ControlKey"]);
this.ControlSrc = Null.SetNullString(dr["ControlSrc"]);
this.MvcControlClass = Null.SetNullString(dr["MvcControlClass"]);
this.SupportsPartialRendering = Null.SetNullBoolean(dr["SupportsPartialRendering"]);
}

Expand All @@ -55,6 +60,9 @@ protected void ReadXmlInternal(XmlReader reader)
case "controlSrc":
this.ControlSrc = reader.ReadElementContentAsString();
break;
case "mvcControlClass":
this.MvcControlClass = reader.ReadElementContentAsString();
break;
case "supportsPartialRendering":
string elementvalue = reader.ReadElementContentAsString();
if (!string.IsNullOrEmpty(elementvalue))
Expand All @@ -71,6 +79,7 @@ protected void WriteXmlInternal(XmlWriter writer)
// write out properties
writer.WriteElementString("controlKey", this.ControlKey);
writer.WriteElementString("controlSrc", this.ControlSrc);
writer.WriteElementString("mvcControlClass", this.MvcControlClass);
writer.WriteElementString("supportsPartialRendering", this.SupportsPartialRendering.ToString());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public static int SaveModuleControl(ModuleControlInfo moduleControl, bool clearC
moduleControl.ControlKey,
moduleControl.ControlTitle,
moduleControl.ControlSrc,
moduleControl.MvcControlClass,
moduleControl.IconFile,
(int)moduleControl.ControlType,
moduleControl.ViewOrder,
Expand All @@ -127,6 +128,7 @@ public static int SaveModuleControl(ModuleControlInfo moduleControl, bool clearC
moduleControl.ControlKey,
moduleControl.ControlTitle,
moduleControl.ControlSrc,
moduleControl.MvcControlClass,
moduleControl.IconFile,
(int)moduleControl.ControlType,
moduleControl.ViewOrder,
Expand Down
5 changes: 5 additions & 0 deletions DNN Platform/Library/Entities/Modules/ModuleInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,11 @@ public string GetProperty(string propertyName, string format, CultureInfo format
propertyNotFound = false;
result = PropertyAccess.FormatString(this.ModuleControl.ControlSrc, format);
break;
case "mvcControlClass":
isPublic = false;
propertyNotFound = false;
result = PropertyAccess.FormatString(this.ModuleControl.MvcControlClass, format);
break;
case "controltitle":
propertyNotFound = false;
result = PropertyAccess.FormatString(this.ModuleControl.ControlTitle, format);
Expand Down
1 change: 1 addition & 0 deletions DNN Platform/Library/Entities/Portals/PortalSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace DotNetNuke.Entities.Portals
using System.Linq;
using System.Web;

using DotNetNuke.Abstractions.Framework;
using DotNetNuke.Abstractions.Portals;
using DotNetNuke.Common;
using DotNetNuke.Common.Utilities;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ namespace DotNetNuke.Entities.Portals
using System.Linq;

using DotNetNuke.Abstractions.Application;
using DotNetNuke.Abstractions.Framework;
using DotNetNuke.Collections;
using DotNetNuke.Common;
using DotNetNuke.Common.Utilities;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Entities.Tabs;
using DotNetNuke.Framework;
using DotNetNuke.Security;
using DotNetNuke.Services.Localization;
using DotNetNuke.UI.Skins;
Expand Down Expand Up @@ -125,7 +127,7 @@ public virtual PortalSettings.PortalAliasMapping GetPortalAliasMappingMode(int p
return aliasMapping;
}

/// <inheritdoc />
/// <inheritdoc/>
public virtual IList<ModuleInfo> GetTabModules(PortalSettings portalSettings)
{
return portalSettings.ActiveTab.Modules.Cast<ModuleInfo>().Select(m => m).ToList();
Expand Down Expand Up @@ -183,13 +185,13 @@ public virtual void LoadPortalSettings(PortalSettings portalSettings)
var settings = PortalController.Instance.GetPortalSettings(portalSettings.PortalId);
portalSettings.Registration = new RegistrationSettings(settings);

var clientResourcesSettings = new ClientResourceSettings();
var clientResourcesSettings = new Web.Client.ClientResourceSettings();
bool overridingDefaultSettings = clientResourcesSettings.IsOverridingDefaultSettingsEnabled(portalSettings.PortalId);

int crmVersion;
if (overridingDefaultSettings)
{
int? globalVersion = new ClientResourceSettings().GetVersion(portalSettings.PortalId);
int? globalVersion = new Web.Client.ClientResourceSettings().GetVersion(portalSettings.PortalId);
crmVersion = globalVersion ?? default(int);
}
else
Expand Down Expand Up @@ -280,7 +282,6 @@ public virtual void LoadPortalSettings(PortalSettings portalSettings)
portalSettings.DataConsentDelayMeasurement = setting;
setting = settings.GetValueOrDefault("AllowedExtensionsWhitelist", this.hostSettingsService.GetString("DefaultEndUserExtensionWhitelist"));
portalSettings.AllowedExtensionsWhitelist = new FileExtensionWhitelist(setting);

setting = settings.GetValueOrDefault("CspHeaderMode", "OFF");
switch (setting.ToUpperInvariant())
{
Expand Down
6 changes: 4 additions & 2 deletions DNN Platform/Library/Entities/Tabs/TabController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ public static void CopyDesignToChildren(IEventLogger eventLogger, TabInfo parent
tab.SiteMapPriority,
UserController.Instance.GetCurrentUserInfo().UserID,
tab.CultureCode,
tab.IsSystem);
tab.IsSystem,
(int)tab.PagePipeline);

UpdateTabVersion(tab.TabID);

Expand Down Expand Up @@ -2124,7 +2125,8 @@ public void UpdateTab(TabInfo updatedTab)
updatedTab.SiteMapPriority,
UserController.Instance.GetCurrentUserInfo().UserID,
updatedTab.CultureCode,
updatedTab.IsSystem);
updatedTab.IsSystem,
(int)updatedTab.PagePipeline);

// Update Tags
List<Term> terms = updatedTab.Terms;
Expand Down
11 changes: 11 additions & 0 deletions DNN Platform/Library/Entities/Tabs/TabInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace DotNetNuke.Entities.Tabs
using System.Xml.Serialization;

using DotNetNuke.Abstractions.Application;
using DotNetNuke.Abstractions.Framework;
using DotNetNuke.Collections.Internal;
using DotNetNuke.Common;
using DotNetNuke.Common.Internal;
Expand All @@ -27,6 +28,7 @@ namespace DotNetNuke.Entities.Tabs
using DotNetNuke.Entities.Portals;
using DotNetNuke.Entities.Tabs.TabVersions;
using DotNetNuke.Entities.Users;
using DotNetNuke.Framework;
using DotNetNuke.Security.Permissions;
using DotNetNuke.Services.Exceptions;
using DotNetNuke.Services.FileSystem;
Expand Down Expand Up @@ -525,6 +527,10 @@ public CacheLevel Cacheability
[XmlElement("localizedVersionGuid")]
public Guid LocalizedVersionGuid { get; set; }

/// <summary>Gets or sets the rendering pipeline of the page.</summary>
[XmlElement("pagepipeline")]
public PagePipeline.PageRenderingPipeline PagePipeline { get; set; }

/// <summary>Gets or sets a collection of the modules on this page.</summary>
/// <value>An <see cref="ArrayList"/> of <see cref="ModuleInfo"/>.</value>
[XmlIgnore]
Expand Down Expand Up @@ -855,6 +861,10 @@ public string GetProperty(string propertyName, string format, CultureInfo format
propertyNotFound = false;
result = PropertyAccess.FormatString(this.SiteMapPriority.ToString(formatProvider), format);
break;
case "pagepipeline":
propertyNotFound = false;
result = this.PagePipeline.ToString();
break;
}

if (!isPublic && currentScope != Scope.Debug)
Expand Down Expand Up @@ -985,6 +995,7 @@ public override void Fill(IDataReader dr)
this.BreadCrumbs = null;
this.Modules = null;
this.IsSystem = Null.SetNullBoolean(dr["IsSystem"]);
this.PagePipeline = (PagePipeline.PageRenderingPipeline)Null.SetNullInteger(dr["PagePipeline"]);
}

/// <summary>Gets the URL for the given <paramref name="cultureCode"/>.</summary>
Expand Down
15 changes: 15 additions & 0 deletions DNN Platform/Library/Framework/MvcPipeline/MvcPipelineSettings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information

namespace DotNetNuke.Framework.MvcPipeline
{
using DotNetNuke.Abstractions.Framework;
using DotNetNuke.Entities.Modules.Settings;

internal class MvcPipelineSettings
{
[PortalSetting]
public PagePipeline.PortalRenderingPipeline DefaultPagePipeline { get; set; }
}
}
Loading
Loading