MVC renders /surface/umbraco/... type URL on partials
Guys, I'm a newbie on MVC and EXTREMELY newbie on Umbraco. I am trying to integrate our custom made app's into Umbraco, so that we have the best of both worlds (Umbraco as the content manager and our app to integrate Umbraco with Dynamics CRM). After reading and watching and surfing and...., I've got to a complete stop, so I would SO MUCH appreciate some help in the form of specific code, not only some link pointers (as they've led me no where).
The scenario is the following:
Umbraco as the main site
User selects "Accounts" and a custom controller (which inherits from SurfaceController) shows a list of accounts (snapshot of controller: http://screencast.com/t/J3Gv8qG4UDf)
My take is that tis should be quite simple, but I'm just missing something. I want my own controllers (which btw, map to Dynamics CRM), and integrate that into Umbraco. I want to render a link to the details of each account.
Any suggestion and tutorial will be GRATLY APPRECIATED.
Maybe not what you're looking for, but if you want to know more about MVC and Umbraco have a look at the Hybrid Framework. It shows how you can do more with MVC in Umbraco.
Glad I could help. Could you mark a post as the solution if it helped you? You could also add another post in which you explain how you fixed it and mark that as the solution.
So this is what we ended up doing. We created a template associated to the content type. In htat template, we added an html.action (for example: @Html.Action("Index", "ContactUs")). The controller renders a partial view, which gets included in the template, allowing us to effectively integrate Umbraco to our CRM. Inside the partial view, we used the following:
BTW, the controller is an Umbraco SurfaceController, so no custom routing (hijacking or whatever) is necessary.
I am not totally satisfied with this solution, as we need to create the template in Umbraco backoffice and then go back to visual studio and create the partial view. I'll keep "digging" till I find a better, more robust solution.
MVC renders /surface/umbraco/... type URL on partials
Guys, I'm a newbie on MVC and EXTREMELY newbie on Umbraco. I am trying to integrate our custom made app's into Umbraco, so that we have the best of both worlds (Umbraco as the content manager and our app to integrate Umbraco with Dynamics CRM). After reading and watching and surfing and...., I've got to a complete stop, so I would SO MUCH appreciate some help in the form of specific code, not only some link pointers (as they've led me no where).
The scenario is the following:
<a href="/umbraco/Surface/AccountsSurface/viewAccount/Watts">Watts</a>
My take is that tis should be quite simple, but I'm just missing something. I want my own controllers (which btw, map to Dynamics CRM), and integrate that into Umbraco. I want to render a link to the details of each account.
Any suggestion and tutorial will be GRATLY APPRECIATED.
Regards, Ariel
Hello,
Maybe not what you're looking for, but if you want to know more about MVC and Umbraco have a look at the Hybrid Framework. It shows how you can do more with MVC in Umbraco.
Jeroen
thanks for your reply Jeroen. We did take a look at the hybrid framework and took some ideas that allowed us to solve the problem
once again, thanks for your reply
best regards, Ariel
Glad I could help. Could you mark a post as the solution if it helped you? You could also add another post in which you explain how you fixed it and mark that as the solution.
Jeroen
So this is what we ended up doing. We created a template associated to the content type. In htat template, we added an html.action (for example: @Html.Action("Index", "ContactUs")). The controller renders a partial view, which gets included in the template, allowing us to effectively integrate Umbraco to our CRM. Inside the partial view, we used the following:
@model xmsbs.Models.ContactUs
@using (Html.BeginUmbracoForm<xmsbs.Controllers.ContactUsController>("contactUs")) {
//html markup
}
BTW, the controller is an Umbraco SurfaceController, so no custom routing (hijacking or whatever) is necessary.
I am not totally satisfied with this solution, as we need to create the template in Umbraco backoffice and then go back to visual studio and create the partial view. I'll keep "digging" till I find a better, more robust solution.
Regards, Ariel
is working on a reply...