Copied to clipboard

Flag this post as spam?

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


  • Jeremy Wiersma 37 posts 134 karma points
    Aug 20, 2014 @ 15:09
    Jeremy Wiersma
    0

    Create template makes Master pages instead of MVC views

    Hi folks,

    Ok this is just driving me crazy.

    I have my system set to MVC mode but when I create a new template Umbraco is creating Master Pages instead of MVC Razor Views. It didn't used to do this, just started doing it tonight.

    How can I ensure that when I create a Template manually I will get a MVC template.

    UPDATE: I've now got a problem where Umbraco did create a MVC View but after editing the HTML in it and publishing, now there is a Master Page instead. On top of that, inside Visual Studio I now have both, but when I try to open the MVC View file it tells me the file does not exist. When I refresh the site files in Visual Studio it still shows both templates.

    Argh :\ Help.

  • Rob Scott 41 posts 94 karma points
    Apr 16, 2015 @ 23:41
    Rob Scott
    1

    Old post, but this is the answer:

    In the configuration xml file, "umbracoSettings.config", you need to change it from "Webforms" to "Mvc"

    <!-- To switch the default rendering engine to MVC, change this value from WebForms to Mvc -->
    <!-- Do not set useAspNetMasterPages to false, it is not relevant to MVC usage -->
    <defaultRenderingEngine>Mvc</defaultRenderingEngine> 
    

    taken from here

  • 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