Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 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
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
Original file line number Diff line number Diff line change
Expand Up @@ -359,5 +359,8 @@ public interface IPortalSettings

/// <summary>Gets a value indicating whether to display the dropdowns to quickly add a moduel to the page in the edit bar.</summary>
bool ShowQuickModuleAddMenu { get; }

/// <summary>Gets the pipeline type for the portal.</summary>
string PagePipeline { get; }
Comment thread
donker marked this conversation as resolved.
Outdated
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// 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.Portals
{
/// <summary>
/// Provides constants for the page pipelines used in the DNN platform,
/// such as WebForms and MVC.
/// </summary>
public static class PagePipelineConstants
{
/// <summary>WebForms.</summary>
public const string WebForms = "webforms";

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

/// <summary>Auto.</summary>
public const string Auto = "auto";
Comment thread
donker marked this conversation as resolved.
Outdated

/// <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";
}
}
10 changes: 9 additions & 1 deletion DNN Platform/Library/Data/DataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1329,14 +1329,21 @@ public virtual void UpdateModuleDefinition(int moduleDefId, string friendlyName,
lastModifiedByUserID);
}

[Obsolete("Deprecated in DotNetNuke 10.99.0. Scheduled removal in v12.0.0.")]
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)
Comment thread
donker marked this conversation as resolved.
Outdated
{
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 +1363,7 @@ 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)
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 +1372,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
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public interface IPortalSettingsController

PortalSettings.PortalAliasMapping GetPortalAliasMappingMode(int portalId);

string GetPortalPagePipeline(int portalId);
Comment thread
donker marked this conversation as resolved.
Outdated

/// <summary>The GetActiveTab method gets the active Tab for the current request.</summary>
/// <param name="tabId">The current tab's id.</param>
/// <param name="portalSettings">The current PortalSettings.</param>
Expand Down
3 changes: 3 additions & 0 deletions DNN Platform/Library/Entities/Portals/PortalSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,9 @@ public string AddCompatibleHttpHeader
/// <inheritdoc />
public bool ShowQuickModuleAddMenu => PortalController.GetPortalSettingAsBoolean("ShowQuickModuleAddMenu", this.PortalId, false);

/// <inheritdoc/>
public string PagePipeline { get; internal set; }

/// <summary>Create an <see cref="IPortalSettings"/> instance.</summary>
/// <returns>A new <see cref="IPortalSettings"/> instance.</returns>
public static IPortalSettings Create()
Expand Down
16 changes: 14 additions & 2 deletions DNN Platform/Library/Entities/Portals/PortalSettingsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace DotNetNuke.Entities.Portals
using System.Linq;

using DotNetNuke.Abstractions.Application;
using DotNetNuke.Abstractions.Portals;
using DotNetNuke.Collections;
using DotNetNuke.Common;
using DotNetNuke.Common.Utilities;
Expand Down Expand Up @@ -125,7 +126,18 @@ public virtual PortalSettings.PortalAliasMapping GetPortalAliasMappingMode(int p
return aliasMapping;
}

/// <inheritdoc />
/// <inheritdoc/>
public virtual string GetPortalPagePipeline(int portalId)
{
if (PortalController.Instance.GetPortalSettings(portalId).TryGetValue("PagePipeline", out var setting))
{
return string.IsNullOrEmpty(setting) ? PagePipelineConstants.WebForms : setting;
}

return PagePipelineConstants.WebForms;
}

/// <inheritdoc/>
public virtual IList<ModuleInfo> GetTabModules(PortalSettings portalSettings)
{
return portalSettings.ActiveTab.Modules.Cast<ModuleInfo>().Select(m => m).ToList();
Expand Down Expand Up @@ -280,7 +292,7 @@ public virtual void LoadPortalSettings(PortalSettings portalSettings)
portalSettings.DataConsentDelayMeasurement = setting;
setting = settings.GetValueOrDefault("AllowedExtensionsWhitelist", this.hostSettingsService.GetString("DefaultEndUserExtensionWhitelist"));
portalSettings.AllowedExtensionsWhitelist = new FileExtensionWhitelist(setting);

portalSettings.PagePipeline = settings.GetValueOrDefault("PagePipeline", "webforms");
Comment thread
donker marked this conversation as resolved.
Outdated
setting = settings.GetValueOrDefault("CspHeaderMode", "OFF");
switch (setting.ToUpperInvariant())
{
Expand Down
25 changes: 25 additions & 0 deletions DNN Platform/Library/Entities/Tabs/TabInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,27 @@ public string SkinDoctype
[JsonIgnore]
public bool UseBaseFriendlyUrls { get; set; }

/// <summary>Gets a value indicating the pipeline type.</summary>
[XmlIgnore]
[JsonIgnore]
public string PagePipeline
{
get
{
string pagePipeline;
if (this.TabSettings.ContainsKey("PagePipeline") && !string.IsNullOrEmpty(this.TabSettings["PagePipeline"].ToString()))
Comment thread
donker marked this conversation as resolved.
Outdated
{
pagePipeline = this.TabSettings["PagePipeline"].ToString();
}
else
{
pagePipeline = string.Empty;
}

return pagePipeline;
}
}

/// <inheritdoc />
[SuppressMessage("Microsoft.Naming", "CA1725:ParameterNamesShouldMatchBaseDeclaration", Justification = "Breaking change")]
public string GetProperty(string propertyName, string format, CultureInfo formatProvider, UserInfo accessingUser, Scope currentScope, ref bool propertyNotFound)
Expand Down Expand Up @@ -855,6 +876,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 = PropertyAccess.FormatString(this.PagePipeline, format);
break;
}

if (!isPublic && currentScope != Scope.Debug)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ private static void ProcessControls(XPathNavigator controlNav, string moduleFold

controlSrc = controlSrc.Replace('\\', '/');
moduleControl.ControlSrc = controlSrc;

moduleControl.MvcControlClass = Util.ReadElement(controlNav, "mvcControlClass");
moduleControl.IconFile = Util.ReadElement(controlNav, "iconfile");

string controlType = Util.ReadElement(controlNav, "type");
Expand Down
13 changes: 8 additions & 5 deletions DNN Platform/Library/Services/Upgrade/Upgrade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,14 @@ public static TabInfo AddHostPage(string tabName, string description, string tab
/// <param name="controlKey">The key for this control in the Definition.</param>
/// <param name="controlTitle">The title of this control.</param>
/// <param name="controlSrc">The source of ths control.</param>
/// <param name="mvcControlClass">The mvc control class of ths control.</param>
Comment thread
donker marked this conversation as resolved.
Outdated
/// <param name="iconFile">The icon file.</param>
/// <param name="controlType">The type of control.</param>
/// <param name="viewOrder">The vieworder for this module.</param>
public static void AddModuleControl(int moduleDefId, string controlKey, string controlTitle, string controlSrc, string iconFile, SecurityAccessLevel controlType, int viewOrder)
public static void AddModuleControl(int moduleDefId, string controlKey, string controlTitle, string controlSrc, string mvcControlClass, string iconFile, SecurityAccessLevel controlType, int viewOrder)
Comment thread
donker marked this conversation as resolved.
{
// Call Overload with HelpUrl = Null.NullString
AddModuleControl(moduleDefId, controlKey, controlTitle, controlSrc, iconFile, controlType, viewOrder, Null.NullString);
AddModuleControl(moduleDefId, controlKey, controlTitle, controlSrc, mvcControlClass, iconFile, controlType, viewOrder, Null.NullString);
}

/// <summary>AddModuleDefinition adds a new Core Module Definition to the system.</summary>
Expand Down Expand Up @@ -2134,16 +2135,17 @@ protected static bool IsLanguageEnabled(int portalid, string code)
/// <param name="controlKey">The key for this control in the Definition.</param>
/// <param name="controlTitle">The title of this control.</param>
/// <param name="controlSrc">Te source of ths control.</param>
/// <param name="mvcControlClass">The mvc control class.</param>
/// <param name="iconFile">The icon file.</param>
/// <param name="controlType">The type of control.</param>
/// <param name="viewOrder">The vieworder for this module.</param>
/// <param name="helpURL">The Help Url.</param>
private static void AddModuleControl(int moduleDefId, string controlKey, string controlTitle, string controlSrc, string iconFile, SecurityAccessLevel controlType, int viewOrder, string helpURL)
private static void AddModuleControl(int moduleDefId, string controlKey, string controlTitle, string controlSrc, string mvcControlClass, string iconFile, SecurityAccessLevel controlType, int viewOrder, string helpURL)
{
AddModuleControl(moduleDefId, controlKey, controlTitle, controlSrc, iconFile, controlType, viewOrder, helpURL, false);
AddModuleControl(moduleDefId, controlKey, controlTitle, controlSrc, mvcControlClass, iconFile, controlType, viewOrder, helpURL, false);
}

private static void AddModuleControl(int moduleDefId, string controlKey, string controlTitle, string controlSrc, string iconFile, SecurityAccessLevel controlType, int viewOrder, string helpURL, bool supportsPartialRendering)
private static void AddModuleControl(int moduleDefId, string controlKey, string controlTitle, string controlSrc, string mvcControlClass, string iconFile, SecurityAccessLevel controlType, int viewOrder, string helpURL, bool supportsPartialRendering)
{
DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "AddModuleControl:" + moduleDefId);

Expand All @@ -2161,6 +2163,7 @@ private static void AddModuleControl(int moduleDefId, string controlKey, string
ControlKey = controlKey,
ControlTitle = controlTitle,
ControlSrc = controlSrc,
MvcControlClass = mvcControlClass,
ControlType = controlType,
ViewOrder = viewOrder,
IconFile = iconFile,
Expand Down
Loading