Hello,I'm trying to render rhe contents of child nodes within the parent page in an MVC Umbraco 6.1.2 project. I specifically want to do this so that users of the CMS can select the template to use for the child nodes which will appear within the parent.I thought the way to do this would be to call library.RenderTemplate (nodeID) from within the parent page's template but I can't get it working. I've also tried including a macro in the parent page, and calling RenderTemplate from within the macro.The error message I'm currently getting is shown below...<!-- Error rendering template with id 1063: 'System.ArgumentNullException: Value cannot be null. Parameter name: controller at System.Web.Mvc.ControllerContext..ctor(RequestContext requestContext, ControllerBase controller) at Umbraco.Web.Templates.TemplateRenderer.ExecuteTemplateRendering(TextWriter sw, PublishedContentRequest contentRequest) at Umbraco.Web.Templates.TemplateRenderer.Render(StringWriter writer) at umbraco.library.RenderTemplate(Int32 PageId, Int32 TemplateId)' -->Any ideas what's wrong here?Thanks,- Chris
Have a look at this issue - sounds like the same thing you're experiencing and it should be fixed in 6.1.3, though I think you'll have to use the nightlies since its not released yet.
RenderTemplate problem in Umbraco 6 MVC project
Hello,I'm trying to render rhe contents of child nodes within the parent page in an MVC Umbraco 6.1.2 project. I specifically want to do this so that users of the CMS can select the template to use for the child nodes which will appear within the parent.I thought the way to do this would be to call library.RenderTemplate (nodeID) from within the parent page's template but I can't get it working. I've also tried including a macro in the parent page, and calling RenderTemplate from within the macro.The error message I'm currently getting is shown below...<!-- Error rendering template with id 1063: 'System.ArgumentNullException: Value cannot be null. Parameter name: controller at System.Web.Mvc.ControllerContext..ctor(RequestContext requestContext, ControllerBase controller) at Umbraco.Web.Templates.TemplateRenderer.ExecuteTemplateRendering(TextWriter sw, PublishedContentRequest contentRequest) at Umbraco.Web.Templates.TemplateRenderer.Render(StringWriter writer) at umbraco.library.RenderTemplate(Int32 PageId, Int32 TemplateId)' -->Any ideas what's wrong here?Thanks,- Chris
Hi Chris,
Have a look at this issue - sounds like the same thing you're experiencing and it should be fixed in 6.1.3, though I think you'll have to use the nightlies since its not released yet.
-Tom
That does indeed look like the one!
Thanks - I'll get the nightly build and see how I get on.
- Chris
is working on a reply...