Content Types in Orchard

Tags: Orchard CMS, Orchard Beginner, Content Types, Orchard CMS Newbie

Welcome to Orchard Beginner! A Content Type is a blueprint of how content items of that type look like: it defines the set of content parts that make up the content types.

A content type only consists of content parts, even if it seems that you can directly attach content fields to a content type from the admin UI. When you attach fields from the admin UI in reality an invisible part is created that has the same name as the content type(e.g. a Page part is created for the Page content type) and the fields get attached to that.

1. Click on Content Definition

2. e.g. Page Content Type

Every content type has a Display Name, Content Type Id, Creatable and Draftable flags.

3. Creating a Content Type, Click on Create New Type

4. e.g. Student Page Content Type

Fill in the details for Display Name, Content Type Id is taken care by Orchard so you don't need to specify it and check both the check boxes Creatable & Draftable.

5. Creatable and Draftable

Creatable Determines if an instance of the current content type can be created through the UI and Draftable Determines if the current content type supports draft versions. As the check box for Creatable and Draftable were checked we have option to create a instance of the Student Page content type from the admin UI directly. And the draftable allows us to create and save the content items of type Student Page as a draft.

In the next post we'll be talking about Content Fields and Content Parts.

Happy Orcharding!

No Comments

Add a Comment