Copied to clipboard

Flag this post as spam?

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


  • Owain Williams 482 posts 1414 karma points MVP 7x c-trib
    Feb 06, 2017 @ 11:51
    Owain Williams
    0

    Umbraco MVC Setup - VS2013

    This is probably a really stupid question but I've searched around the web and can't find the answer. I'm thinking I may have setup my Umbraco dev enviroment up incorrectly in Visual Studio 2013. I have a working install of Umbraco running but I can't find the Controller folder or Model folder to allow me to use them.

    enter image description here

    This is how my install looks just now.

    Do I need to start again with a different setup to allow me to write my own controllers etc? Thanks,

  • Ronak Panchal 71 posts 230 karma points
    Feb 06, 2017 @ 12:29
    Ronak Panchal
    0

    Hello owain,

    you can add your own folder to solution named 'controllers' in that solution.

    Ronak Panchal

  • Owain Williams 482 posts 1414 karma points MVP 7x c-trib
    Feb 06, 2017 @ 12:30
    Owain Williams
    0

    Is there any other folders you would say I need to add?

    I've added Controllers & Models, just wondered if there was anything else missing that I might use.

    Thanks.

  • Ronak Panchal 71 posts 230 karma points
    Feb 06, 2017 @ 12:36
    Ronak Panchal
    0

    Yes You doesn't need to do anything more you can add as your need.

    if you want to separation of code and better structure.

    Then you can add new class library project to solution

    You can see below Image for structure.

    enter image description here

    Hope this will help you,

    Ronak Panchal.

  • Owain Williams 482 posts 1414 karma points MVP 7x c-trib
    Feb 06, 2017 @ 12:38
    Owain Williams
    0

    Thanks Ronak. That's a great help.

    I'm trying to follow a tutorial on Learn Umbraco 7 but I can't work out where I create the class :

    You now need to create a class to declare your new section:

    using umbraco.businesslogic; using umbraco.interfaces;

    namespace UmbracoBookshelf.Applications { [Application("UmbracoBookshelf", "Umbraco Bookshelf", "icon-books", 15)] public class UmbracoBookshelfApplication : IApplication { } }

    Which can be found on this section

    That's what got me thinking maybe I hadn't setup the MVC side correctly.

  • Ronak Panchal 71 posts 230 karma points
    Feb 06, 2017 @ 13:54
    Ronak Panchal
    0

    you mean you want to make a custom section ?

    Ronak

  • Owain Williams 482 posts 1414 karma points MVP 7x c-trib
    Feb 06, 2017 @ 13:55
    Owain Williams
    0

    Yes. I was just trying to follow the tutorial but I couldn't work out where I was meant to create a section in code, programmatically.

  • Ronak Panchal 71 posts 230 karma points
    Feb 06, 2017 @ 14:12
    Ronak Panchal
    0

    That tutorial contain much more things.

    If you ask us for particular thing where you are stuck then we can do something.

    i don't know where you are stopping.

    Ronak Panchal.

  • Owain Williams 482 posts 1414 karma points MVP 7x c-trib
    Feb 06, 2017 @ 14:39
    Owain Williams
    0

    Thanks for your continued help Ronak.

    I am stuck at the version part where it says I need to create a class to declare the section.

    The class has a namespace UmbracoBookshelf.Applications but I can't replicate this within my code.

  • 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