Part of: #2599
Description of problem
DotNetNuke.Modules.DDRMenu is dependent on DotNetNuke.Web.Razor which is marked for deletion in DNN 11.0 as part of the Razor Pages Pipeline Implementation.
The DDRMenu uses the RazorEngine which we can swap out to use the default Microsoft Implementation or Razor Pages.
public void Render(object source, HtmlTextWriter htmlWriter, TemplateDefinition liveDefinition)
{
if (!(string.IsNullOrEmpty(liveDefinition.TemplateVirtualPath)))
{
var resolver = new PathResolver(liveDefinition.Folder);
dynamic model = new ExpandoObject();
model.Source = source;
model.ControlID = DNNContext.Current.HostControl.ClientID;
model.Options = ConvertToJson(liveDefinition.ClientOptions);
model.DNNPath = resolver.Resolve("/", PathResolver.RelativeTo.Dnn);
model.ManifestPath = resolver.Resolve("/", PathResolver.RelativeTo.Manifest);
model.PortalPath = resolver.Resolve("/", PathResolver.RelativeTo.Portal);
model.SkinPath = resolver.Resolve("/", PathResolver.RelativeTo.Skin);
var modelDictionary = model as IDictionary<string, object>;
liveDefinition.TemplateArguments.ForEach(a => modelDictionary.Add(a.Name, a.Value));
var razorEngine = new RazorEngine(liveDefinition.TemplateVirtualPath, null, null);
var writer = new StringWriter();
razorEngine.Render<dynamic>(writer, model);
htmlWriter.Write(writer.ToString());
}
}
The line that is using DotNetNuke.Web.Razor is:
var razorEngine = new RazorEngine(liveDefinition.TemplateVirtualPath, null, null);
Description of solution
Ideally the new implementation of this code will use Microsoft's System.Web.Razor. If that does not work we will use the new Razor Pages Modules
Part of: #2599
Description of problem
DotNetNuke.Modules.DDRMenuis dependent onDotNetNuke.Web.Razorwhich is marked for deletion in DNN 11.0 as part of the Razor Pages Pipeline Implementation.The DDRMenu uses the
RazorEnginewhich we can swap out to use the default Microsoft Implementation or Razor Pages.The line that is using
DotNetNuke.Web.Razoris:Description of solution
Ideally the new implementation of this code will use Microsoft's System.Web.Razor. If that does not work we will use the new Razor Pages Modules