Hi Joe,
I'm just relooking at the DDR menu that we spoke about some time ago. I did have a look at the time, but still can't figure it out.
I found some sample Razor code that I think you were refering to:
http://www.dnnsoftware.com/wiki/ddr...-templates Aside, I'm using the following C# to run all Razor code snippets in my module:
//***********************************************************
string FullFileName = @"/desktopmodules/modulename/Templates/somefilename.cshtml"; //Razor File
ModuleContext mc = new ModuleContext();
string lLocalResourceFile = "";
var writer = new StringWriter();
var razorEngine = new DotNetNuke.Web.Razor.RazorEngine(FullFileName, mc, lLocalResourceFile);
//Render the result
razorEngine.Render(writer, MyObject);
//************************************************************
Where 'MyObject' is the object to be accessed as the 'Model' in the Razor file.
In the Razor file, I use the following line to reference the 'Model':
@inherits DotNetNuke.Web.Razor.DotNetNukeWebPage
This all works fine, but for the DDR menu code I can't work out which object to pass in as the Model.
I was thinking it could be 'DotNetNuke.Entities.Tabs.TabInfo', but that doesn't have the Source.root member.
Any ideas where I could try and find this?
All the best,
Steve