This project is read-only.

Custom content part is not recognized / selectable

Topics: Writing modules
Nov 23, 2011 at 12:41 AM
Edited Nov 23, 2011 at 12:42 AM

I have a use case where I would like to create a content part that only contains functionality. It modifies some parts of the ui in the editor based on some content-type-specific settings.  This means that it will not persist anything other than settings.

What is the minimum required implementation to make a content part like this show up in Orchard?  I've implemented the driver as well as empty part and part record models (with no storage filter), empty handlers, correct editor placement, and the editor / settings views in correct folders.  Nothing I do will make the content part show up in the system, even though the module feature is turned on.

Is there something obvious I'm missing?


Nov 23, 2011 at 11:33 AM

Have you attached the part to a type?

Nov 23, 2011 at 5:09 PM

I can't.  It doesn't show up in the list of parts, either to attach or on the content part tab.  That's the problem.

Nov 23, 2011 at 5:21 PM

Have you properly created the part definition in the migrations file, marking the part with Attached()?

Nov 23, 2011 at 5:28 PM

That was it!  I had been ignoring the migrations file because I wasn't persisting anything.


Thanks for your help.