This project is read-only.

Add a content part to only the user type

Topics: Customizing Orchard, Writing modules
Oct 15, 2011 at 12:02 PM


I am involved with utilkising orchard to write a global language site. In this regard I wish to extend the user entity to have a Spoken language entity. I have read the documentation, and understand how to create entities for the database, and content parts/fields. What I'm struggling with is how to I ensure that only my user type can have a spoken language?

Any help in this would be gratefully accepted.



Oct 15, 2011 at 11:45 PM

I would look at one of the profile modules from the gallery for inspiration, as well as at the culture picker module.

Oct 16, 2011 at 2:57 PM

Create your part and attach it to the User either in Migrations (see codegen datamigration) or in a handler. Don't make the part "Attachable()", and that's it.