Copied to clipboard

Flag this post as spam?

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


  • Craig100 1136 posts 2523 karma points c-trib
    Apr 16, 2016 @ 16:07
    Craig100
    0

    Best Practice for UaaS Visual Studio set up and ModelsBuilder

    Just starting with UaaS. Since 7.4 (I think) when you create a DocType the template is created as :-

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage<ContentModels.BasePage>
    @using ContentModels = Umbraco.Web.PublishedContentModels;
    @{
        Layout = null;
    }
    

    So in Visual Studio the immediate issue is the error "Namespace 'BasePage' doesn't exist".

    What's the best way to get rid of this? Does UaaS actually need the ModelsBuilder or is it ok just to switch it off in web.config?

    Any advice appreciated.

  • Lars Gyrup Brink Nielsen 6 posts 76 karma points
    Jun 01, 2016 @ 19:19
    Lars Gyrup Brink Nielsen
    0

    You need to change UmbracoTemplatePage to UmbracoViewPage. Also, if BasePage is used as a composition, it will be called IBasePage by ModelsBuilder.

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Jun 01, 2016 @ 20:54
    Alex Skrypnyk
    1

    Hi Craig,

    Do you have BasePage docType in your Umbraco?

    You have to create models before using it.

    Cheers

Please Sign in or register to post replies

Write your reply to:

Draft