If I have only one template, can it has RenderBody or RenderSection?
In MVC you have the template and the Content defines @Section TheSection{} and things that are not defined in a section gets into RenderBody.
I thought Umbraco worked lite that, the Template has RenderSection("TheSection",false) and if the DocumentType has an property TheSection that content is displayed in RenderSection("TheSection",false).
But this seems not to be the case. If I create Content with a template that has RenderBody I get the following exception
The file "~/Views/Layout.cshtml" cannot be requested directly because it calls the "RenderBody" method.
Does that meen that a Content can only use templates that has no RenderSection or RenderBody?
And the template has to use @Model.Content.GetPropertyValue("TheSection")???
Umbraco 6 RenderBody
Hi, Im new to Umbraco
I donĀ“t understand how Templeting works
If I have only one template, can it has RenderBody or RenderSection?
In MVC you have the template and the Content defines @Section TheSection{} and things that are not defined in a section gets into RenderBody.
I thought Umbraco worked lite that, the Template has RenderSection("TheSection",false) and if the DocumentType has an property TheSection that content is displayed in RenderSection("TheSection",false).
But this seems not to be the case. If I create Content with a template that has RenderBody I get the following exception
The file "~/Views/Layout.cshtml" cannot be requested directly because it calls the "RenderBody" method.
Does that meen that a Content can only use templates that has no RenderSection or RenderBody?
And the template has to use @Model.Content.GetPropertyValue("TheSection")???
is working on a reply...