Adding a link to a view and rendering a new shape from tha

Topics: Writing modules
Jan 24, 2012 at 6:46 AM


I am creating a view that allows a user to edit some content. I've written all the driver code, and in the display view I need to provide a link to allow the user to edit an item. is this as somple as providing a link that calls a controller and builds a new shape, are there any examples people can point me to in the code for reference?

All the documentation shows how to create drivers/shapes but not how to invoke an edit driver from the front ent.



Jan 24, 2012 at 9:21 AM

Look at the IContentManager's Build*() methods. What you need here is the BuildEditor() (this creates the editor shape by calling all the parts' Editor(); you have to surround it with a form though) and UpdateEditor() (this binds POST data to the parts' properties and calls the POST Editor() driver methods).

Jan 24, 2012 at 11:51 AM

You can use @Html.ItemEditLink(content) if you just want to link to the normal editor page.