Closed GerardSmit closed 1 year ago
I've created a PR (#5606) with the proposed solution.
I don't have an issue with these changes, thought I am curious what your use case is for needing a custom module control factory.
I'm prototyping a cross-platform CMS in ASP.NET Core uses the same database as DNN. My end goal is where you can make modules for both .NET Framework and .NET (Core).
I have a prototype working with the alternative solution (overriding IModuleControlPipeline) but this is quite hacky. š
Closing as this is merged in the DNN 10 branch š
Thanks!
Description of problem
It's not possible to register or override a custom IModuleControlFactory in DNN. This is because the extensions are hard-coded in ModuleControlPipeline.
Description of solution
.html
to modify the content) you can give it a priority of 200 to overrule the DNN factory.The new factory would look like this:
The pipeline will be changed that it'll resolve all
IModuleControlFactory
and get the first supported factory.Description of alternatives considered
While it is currently possible to override the IModuleControlPipeline in the service collection:
This brings two problems:
IModuleControlPipeline
, the last one will be used. All other pipelines will be ignored.ModuleControlPipeline
) is in a class library (DotNetNuke.ModulePipeline
) which is not in NuGet. So you'll have to add a DLL-reference. š