Master template shoots out error when @RenderBody() is inserted
Hi all,
So I have a master template sitting at the root of the templates folder, a document type to accompany it and I have created a new template which is a sub-template of master. Now every time I put @RenderBody() anywhere in my master I get a yellow screen stating the following:
"The file "~/Views/Master.cshtml" cannot be requested directly because it calls the "RenderBody" method."
I'm not sure how to resolve this. Can anyone help me out?
If you are new to Umbraco I think that you should take a look at Umbraco TV. These videos http://umbraco.tv/videos/umbraco-v7/ shows the basic concepts of Umbraco and how to work with content in Umbraco CMS, but some of the videos are free to watch, and some needs that you require that you subscribe to Umbraco TV. You can find prices here http://umbraco.tv/plans-signup/ if you want to have full access to Umbraco TV.
Master template shoots out error when @RenderBody() is inserted
Hi all,
So I have a master template sitting at the root of the templates folder, a document type to accompany it and I have created a new template which is a sub-template of master. Now every time I put @RenderBody() anywhere in my master I get a yellow screen stating the following:
"The file "~/Views/Master.cshtml" cannot be requested directly because it calls the "RenderBody" method."
I'm not sure how to resolve this. Can anyone help me out?
Thanks,
Jon
Hi Jon and welcome to our,
I think this video on the Umbraco TV can help you solve the issue see here: http://umbraco.tv/videos/umbraco-v7/implementor/fundamentals/templating/using-master-templates/ and this video too.http://umbraco.tv/videos/umbraco-v7/implementor/fundamentals/templating/advanced-master-templates/
If you are new to Umbraco I think that you should take a look at Umbraco TV. These videos http://umbraco.tv/videos/umbraco-v7/ shows the basic concepts of Umbraco and how to work with content in Umbraco CMS, but some of the videos are free to watch, and some needs that you require that you subscribe to Umbraco TV. You can find prices here http://umbraco.tv/plans-signup/ if you want to have full access to Umbraco TV.
Other good resources could be this http://our.umbraco.org/documentation/Using-Umbraco/Creating-Basic-Site/, and this article http://24days.in/umbraco/2014/how-to-set-up-an-umbraco-site/ from the year Umbraco advent calendar from Blake Smith
Hope this helps,
/Dennis
Oh dear I thought I deleted this post. I managed to figure it out! haha thanks for your help.
Hi Jon, would you mind sharing your solution? i am stuck with the same problem
is working on a reply...