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.
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.
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
Perhaps this could help you : http://umbraco.com/follow-us/blog-archive/2012/10/30/getting-started-with-mvc-in-umbraco-410.aspx in the right direction
This might also help: http://24days.in/umbraco/2012/creating-a-login-form-with-umbraco-mvc-surfacecontroller/
Jeroen
Thansk guys this is helping - I'll let you know how I get on.
Adam
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.
is working on a reply...