Copied to clipboard

Flag this post as spam?

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


  • Adam Jenkin 71 posts 226 karma points
    Feb 06, 2013 @ 12:25
    Adam Jenkin
    0

    MVC example/help for a document type, views and controller

    I am looking for a complete example of using a document type, view and custom controller in umbraco 4.8.

    On a project, I am considering this for a Create Profile type of page. I would envisage this working by

    1. Having a document type in umbraco called CreateProfile (The Model)

    2. Having two views

    a. A "Create" view containing the form which takes data from the visitor.

    b. A "Complete" view to be returned on completion.

    3. A controller to

    a. Return the "Create" view as the default view.

    b. Contain a "Create" [HTTP-POST] method to take back the view/model to create the member profile data in umbraco

    c. Return the "Complete" view if the post was valid

    I have a very basic knowledge of MVC (probably shown by the way im describing things in this post!).

    I have taken a look at the documentation around views, surfaces controllers etc. but am struggling to piece it all together for what I am trying to achieve.

    Can anyone help?

    Thanks,

    Adam

     

     

  • kristian schneider 190 posts 351 karma points
    Feb 06, 2013 @ 15:52
  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Feb 06, 2013 @ 16:15
  • Adam Jenkin 71 posts 226 karma points
    Feb 06, 2013 @ 16:37
    Adam Jenkin
    0

    Thansk guys this is helping - I'll let you know how I get on.

    Adam

  • Adam Jenkin 71 posts 226 karma points
    Feb 06, 2013 @ 18:04
    Adam Jenkin
    0

    Thanks guys, it makes sense now. Have been able to get a surface controller, view models and views working in my project with both http get's and post's.

Please Sign in or register to post replies

Write your reply to:

Draft