Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Using DDR menu in Razor HostUsing DDR menu in Razor Host
Previous
 
Next
New Post
8/27/2011 1:51 PM
 
http://www.dotnetnuke.com/Resources/Wiki/loc/print/Page/DDRMenu-Razor-templates.aspx

I have a razor script with this info in it:
@using DotNetNuke.Web.DDRMenu; @{ var root = Model.Source.root; } @helper RenderNodes(IList<MenuNode> nodes) { if (nodes.Count > 0) { <ul> @foreach (var node in nodes) { var cssClasses = new List<string>(); if (node.First) { cssClasses.Add("first"); } if (node.Last) { cssClasses.Add("last"); } if (node.Selected) { cssClasses.Add("selected"); } var classString = new HtmlString((cssClasses.Count == 0) ? "" : (" class=\"" + String.Join(" ", cssClasses.ToArray()) + "\"")); <li@classString> @if (node.Enabled) { <a href="@node.Url">@node.Text</a> } else { @node.Text } @RenderNodes(node.Children) </li> } </ul> } } @RenderNodes(root.Children)


However, I get the following error:
Error: test is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: c:\inetpub\vhosts\mysite\httpdocs\DesktopModules\RazorModules\RazorHost\Scripts\ULRazor.cshtml(2): error CS0103: The name 'Model' does not exist in the current context ---> System.Web.HttpCompileException: c:\inetpub\vhosts\mysite\httpdocs\DesktopModules\RazorModules\RazorHost\Scripts\ULRazor.cshtml(2): error CS0103: The name 'Model' does not exist in the current context at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) at System.Web.Compilation.BuildManager.GetCompiledType(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetCompiledType(String virtualPath) at DotNetNuke.Web.Razor.RazorEngine.CreateWebPageInstance() at DotNetNuke.Web.Razor.RazorEngine.InitWebpage() at DotNetNuke.Web.Razor.RazorEngine..ctor(String razorScriptFile, ModuleInstanceContext moduleContext, String localResourceFile) at DotNetNuke.Web.Razor.RazorModuleBase.OnPreRender(EventArgs e) --- End of inner exception stack trace ---




When downloading the templates at: http://dnnddrmenutemplates.codeplex.com/  there is an XML (menudef.xml) file included with the ULRazor template.   
Where does this go?  In the DesktopModules/RazorModules/RazorHost/Scripts folder?  Or someplace else? Or is it necessary?

There are no instructions on how to actually install this module...

I'm on DNN 6.01 / .net 4.0
 
New Post
5/2/2013 7:30 AM
 

I can see this is an old post, but did you find the answer on how to include ULRazor template in a DNN site?

Such a pity for the whole work those guys did, but forgot to include some instructions on how to add those templates into DNN web site.

I'm using DNN 07.05.00

 

Thanks

 
New Post
5/2/2013 8:14 AM
 
Have you checked out the wiki http://www.dotnetnuke.com/Resources/W... ? I always add the templates to DesktopModules/DDRMenu, that way they are available to all portals.
 
New Post
5/2/2013 9:13 AM
 
Pingle wrote:
Have you checked out the wiki http://www.dotnetnuke.com/Resources/W... ? I always add the templates to DesktopModules/DDRMenu, that way they are available to all portals.

 Thanks for the link. I knew that one. But it doesn't say HOW to do it. It's like sayind a motherboard has all the bits and pieces but not saying how to assemble them and make it work. LOL

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Using DDR menu in Razor HostUsing DDR menu in Razor Host


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out