Being new to Umbraco and it's "way of thinking" I'm a bit confused as to how to code. And please excuse me for bad terminology since I've only just started working in MVC as well.
Coming from a site made from a template in Visual Studio, how would you execute the code below in Umbraco? Do you need to create content pages for every piece of code you want to run or can you "override" the Umbraco routes?
@using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" })) { @Html.AntiForgeryToken() <a href="javascript:document.getElementById('logoutForm').submit()">Log out</a> }
@Jeroen For someone who has just started MVC, I don't think the Hybrid framework with all it's advanced features (that are great if you KNOW mvc) is very suitable.
@Peter I would recommend you give Umbraco TV a go, in which we teach you how to "think Umbraco". Of course you're also welcome to join our masterclasses which will teach you in two or four days how to go about implementing Umbraco sites.
@Sebastiaan It might be a bit hard to start with the Hybrid Framework and a little more advanced, but once you understand it it's very easy to use. Not only developers are using it at our company, but the frontenders too after a little training. Just wanted to point it out, but it might be easier to start with the umbraco.tv video's ;-).
The Hybrid Framework is more of an example project so you can't add your current solution to it. It can also be used if you start a new project, but you can't simply add your current solution to it.
If you follow the instruction video you've got it running local and you can see how the contact page works. You could try to copy parts of the Hybrid Framework to your own solution to make it work, but like Sebastian said there are probably easier examples on umbraco.tv.
How to think in Umbraco development?
Being new to Umbraco and it's "way of thinking" I'm a bit confused as to how to code. And please excuse me for bad terminology since I've only just started working in MVC as well.
Coming from a site made from a template in Visual Studio, how would you execute the code below in Umbraco? Do you need to create content pages for every piece of code you want to run or can you "override" the Umbraco routes?
@using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" })) {
@Html.AntiForgeryToken()
<a href="javascript:document.getElementById('logoutForm').submit()">Log out</a>
}
Hello,
You could have a look at the Hybrid Framework. It shows "How to think in Umbraco development" with MVC. This blog explains how it works: http://24days.in/umbraco/2013/hybrid-framework/
Jeroen
@Jeroen For someone who has just started MVC, I don't think the Hybrid framework with all it's advanced features (that are great if you KNOW mvc) is very suitable.
@Peter I would recommend you give Umbraco TV a go, in which we teach you how to "think Umbraco". Of course you're also welcome to join our masterclasses which will teach you in two or four days how to go about implementing Umbraco sites.
@Sebastiaan It might be a bit hard to start with the Hybrid Framework and a little more advanced, but once you understand it it's very easy to use. Not only developers are using it at our company, but the frontenders too after a little training. Just wanted to point it out, but it might be easier to start with the umbraco.tv video's ;-).
Jeroen
@Jeroen I think you should start Hybrid Framework masterclasses and videos before offering it to people new to Umbraco.. ;-)
You mean these video's ;-)
How to setup: http://www.screenr.com/TM4H
UK fest presentation: https://www.youtube.com/watch?v=BxOx-9jWF7A&t=17m56s
uHangout: https://www.youtube.com/watch?v=rubA5k5cnxE
And I already pointed out that this blog explains how it works exactly: http://24days.in/umbraco/2013/hybrid-framework/
Jeroen
@Jeroen
So do I just add the Umbraco.Extensions project to my current solution and I'm good to go?
What else would need to be done to get a code like the post method in my first post to execute?
Hello,
The Hybrid Framework is more of an example project so you can't add your current solution to it. It can also be used if you start a new project, but you can't simply add your current solution to it.
If you follow the instruction video you've got it running local and you can see how the contact page works. You could try to copy parts of the Hybrid Framework to your own solution to make it work, but like Sebastian said there are probably easier examples on umbraco.tv.
Jeroen
Ok, I'll take a look at it. Thanks!
Surface controllers is the magic word!
True :-). Especially since you can also use them for route hijacking and posting at the same time: http://our.umbraco.org/documentation/Reference/Mvc/custom-controllers
Jeroen
is working on a reply...