Copied to clipboard

Flag this post as spam?

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


  • Funka! 398 posts 661 karma points
    Jun 07, 2013 @ 00:01
    Funka!
    1

    Mixing MVC Views with Master Pages?

    I am trying to make the move from v4 to v6 and struggling with a few basic concepts.

    First, I see there are two settings in the config/umbracoSettings.config file, useAspNetMasterPages and defaultRenderingEngine. It seems to me these are "either/or" settings and by choosing one or the other that I exclude the ability to mix and match classic umbraco templates (master pages) with new MVC views... Is this correct?

    I installed a brand new 6.1.1 site today to experiment and installed the Business starter kit just to see how things work, but was disappointed to not find any MVC functionality to learn from. (Maybe I need to try the other starter kits?)

    I'm also unsure of where to place my controller and model files, but I'll add that into a different topic I think.

    Thank you!

  • Keith R Hubbard 175 posts 403 karma points
    Jul 15, 2013 @ 08:43
    Keith R Hubbard
    100

    Funka

    the Standard Website MVC is full of concepts to get you started.

    It has a some great introductions for concepts with MVC

    This package has ServiceControlers, Partials, Nesting DocumentTypes, and a great use for the most used umbraco datatype the Multi-Node Tree Picker!!

    http://our.umbraco.org/projects/starter-kits/standard-website-mvc

    To take advantage of MVC you have to do the following. 

    This package requires umbraco 4.10 or 6.x. Please set umbracoSettings.config -> defaultRenderingEngine set to MVC before you install this package.


    Just as a side note Document Types that where Masterpages DocumentTypes tend to think they are still masterpages.  You can use both Views and Masterpage at the sametime with MVC as defaultRenderingEngine.  I nest my Views and keep a great namespace structure.  

     

    I hope this can help someone

    Keith   



  • antao 81 posts 371 karma points
    Jul 15, 2013 @ 09:20
    antao
    2

    Hey Funka, like Keith told, you got some nice resources to get the idea there. 

     

    Take also a look into these two: 

    https://github.com/nul800sebastiaan/Umbraco6Examples 

    https://github.com/hartvig/UmbracoV6APITutorial

     

    Let us know if you have some question! 

    João Antão.

  • Funka! 398 posts 661 karma points
    Jul 15, 2013 @ 21:55
    Funka!
    1

    Hi,

    It seems like so long ago that I wrote this, I'd almost forgotten about it! I did find a while ago and had played around quite a bit with the Standard Website MVC package; so thank you for the suggestion Keith, I agree this is a great thing to get started with! Through experimention and reading tons more on the subject, as far as my original question about mixing MVC Views with (legacy) Master pages, it seems this works but is not encouraged. See issue U4-2385 for an official explanation on why this is. And thank you also Antão, I'll take a look at those links you provided.

Please Sign in or register to post replies

Write your reply to:

Draft