This project is read-only.

Partial View Rendering Using AJAX

Topics: Customizing Orchard
Jun 28, 2013 at 10:42 PM
Background Info: I am in a scenario where I've been tasked with creating a user-friendly admin experience so that "admins" can manage certain content types. I use the term "admin" lightly because it will simply be a role which has permissions setup to view the layer in which the widget will reside. The "admin" will not be able to access the dashboard. The widget will list out the content items that the user has the ability to edit. When selected a modal will open containing all of the fields and part fields on the content item.

The Task: What I need to do is make an asynchronous call to the web server to a controller/driver that will render my partial view/shape that displays the content item's parts/fields and sends the html back to the client to populate the modal with. I need the ability to filter out certain parts and/or fields that get rendered such as the CommonPart (we don't want the users to be able to edit the Owner field, etc.).

The Problem: I do not understand how to go about making an asynchronous call to render a partial view/shape in orchard. So what I'm asking for is some insight into the best way to go about this and/or alternative suggestions.

Other Info: We are building this tool in Orchard 1.6.1 for now, but we will be rolling it out onto 1.7 when the time comes.
Jun 29, 2013 at 12:18 AM