Welcome to Orchard Beginner! A content part is a piece of reusable functionality or UI (or both) that can be appended to any content type in Orchard.
Content parts may not store any corresponding data (in this case, they only add functionality by using existing data) in the database or they can even load data from an external data source (like a webservice).
Lets continue with the same example : Using the Student Page content type
Important Parts :
- Title Part : Provides a Title for your content item.
- Autoroute Part : Adds advanced url configuration options to your content type to completely customize the url pattern for a content item.
- Menu Part : Provides an easy way to create a ContentMenuItem from the content editor.
- Common Part : Provides common information about a content item, such as Owner, Date Created, Date Published and Date Modified.
- PublishLater Part : Adds the ability to delay the publication of a content item to a later date and time.
- Body Part : Allows the editing of text using an editor provided by the configured flavor (e.g. html, text, markdown).
- Comments Part : Allows content items to be commented on.
- many more...
1. Common Part is added by default
2. Adding Content Parts to Student Page Content Type
3. Content Parts Added
4. Settings for Common and Autoroute Part
Autoroute Part allows us to create custom url patterns. Ex. If you want your Urls to be appended with some text like
college/students/studen-name(slug). In order to access the slug i.e. the Url for a Content Item use the Token Content.Slug.
5. Settings for Body and Comment Part
Body Part supports three types of flavors :
- HTML : Provides a rich text editor i.e. TinyMce editor.
- Text : Provides a simple text editor.
- Markdown : Allows to use the Markdown-Syntax which converts the Markdown-Syntax Text into HTML.
6. Creating a New Content Item for Content Type Student Page
7. Filtering Content Items for Content Type Student Page
8. Content Item on the front-end