Building shapes from arbitrary (non-content) objects

Topics: Customizing Orchard, General
Apr 24, 2011 at 1:38 AM

Hi,

While working on the Media Garden project I've found myself writing some code that basically does what the existing content display / edit system does; but for all other objects that aren't IContent.

So there are BuildDisplay, BuildEditor, and UpdateEditor calls but for any T model. You can write a ModelDriver<T> which will handle the shape building and updating processes for anything.

It's really useful, for example, for creating an admin viewmodel and having editor shapes built for it; so the admin view is composed properly from shapes, instead of MVC views.

I'm just wondering if this code would be useful in Orchard core, or if there are aleady any plans from the team to extend shape composition to handle these kind of non-content scenarios?

Coordinator
Apr 24, 2011 at 2:22 AM

The issue I see here is that if you start asking questions, we will have an issue. Why can't you just keep answering them !

Apr 24, 2011 at 4:12 AM

The problem is there were no questions for a while, so I got chance to write some code for myself :)