This project is read-only.

Can I create Drivers/Handlers for admin-created Custom Content Types?

Topics: Customizing Orchard
Nov 23, 2012 at 1:28 PM

Simple question - I have a Product custom content type that I created with the Admin UI.  Can I create a driver or handler for this created type, or do I need to delete it then create my custom type in code?

I'm assuming the latter...


Nov 23, 2012 at 2:05 PM

Drivers correspond to parts; handlers are basically event handlers for content items and thus can contain events targeted at content items of various content types as well as events aimed at the life cycle of content parts.

Content types you create on the admin UI consist of already existing parts and fields, already having drivers and possibly handlers. This means for a start you don't necessarily have to create anything if you want to use those content types from code (you can, however add drivers to parts as parts can have an arbitrary number of drivers or you can write handlers to target already existing content parts and/or items of already existing types).