Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jon 23 posts 53 karma points
    Jan 02, 2015 @ 15:59
    Jon
    0

    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

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jan 02, 2015 @ 16:09
    Dennis Aaen
    0

    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

  • Jon 23 posts 53 karma points
    Jan 02, 2015 @ 17:55
    Jon
    0

    Oh dear I thought I deleted this post. I managed to figure it out! haha thanks for your help.

  • Gerrie Pretorius 4 posts 85 karma points
    Dec 18, 2015 @ 12:06
    Gerrie Pretorius
    1

    Hi Jon, would you mind sharing your solution? i am stuck with the same problem

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies