📜 ⬆️ ⬇️

Architecture Orchard CMS. Basic concepts

This is the second part of the guide “ How to create your website from scratch using Orchard CMS ”. You can get acquainted with the first part of the guide here: the beginning and the continuation .

I remind you that the automatic download of Orchard is available from the application gallery using the Web Platform Installer's quick access tool (click on this link to start the installation ).

Introduction


In order to start working with Orchard CMS, you need to learn the basic concepts that are used in this CMS for working with content. In this part of the tutorial, we will introduce the Orchard CMS elements that make up the CMS architecture.
')

Components used in Orchard CMS


The Orchard content management system is based on Microsoft technologies and open source components created by the community.

Table 2.1. Orchard CMS Architecture
image

Table 1 shows the hierarchy of components of the Orchard CMS architecture:

Basic concepts Orchard CMS


Orchard CMS, like any content management system, operates with a number of concepts. These concepts need to be known to further explore how the system works and expands.

Content item

A content item is a small piece of information, often associated with a single address (URL). Examples of content elements include pages, blog entries, products.

Content types

Content items are instances of content types. To put it another way: content types are classes of content elements. For blog entries, the content type will be “blog entry,” for product products, the content type is “product” and so on.

Content part

In Orchard CMS content types are built from small parts that are called “content parts”. Parts of content are the smallest indivisible unit that makes up the content. Portions of the content may be reused for other types of content.

clip_image002[4]
Fig. 2.1. An example of parts of content Orchard CMS

Figure 1 shows an example of portions of content in Orchard CMS. For the content of the blog entry, the following parts of the content are defined: route (consisting of a header, some URL, content for the main page), blog entry text, blog entry tags, post comments, blog post owner, date and time of postponed publication .

For a single content type, only one part of the content can be defined.

Content Field

Content fields are pieces of information that can be added to a content type. Content fields have names and their own type, they are specific to each type of content. For a particular type of content, there may be several identical content fields.

For example, the content type “product” may have a content text field “warehouse item number”, a numeric content field “product price”, and another numeric content field “product weight”. All these content fields are related only to the product.

It is important to understand the difference between the content part and the content field. Part of the content can be defined for the type of content only once, the fields can be determined many times. On the other hand, parts of the content can be used for different types of content, but the content fields are rigidly assigned to a specific type.

image
Fig. 2.2. Scheme of two types of content and one part

The Orchard system offers the opportunity to form part of the content that will contain several properties at once. This allows you to use instead of a set of content fields one single part with a set of properties. For example, instead of creating for the content type “product” several fields “number”, “value”, “weight” you can create a part of the content “Product properties” with three identical properties. This part can be applied in the future to any type of content, not only to the “product”.

Figure 2.2 shows a diagram of the two types of content “Goods” and “Material”. Each content type has its own content fields that are specific to it. On the other hand, the scheme presents part of the content “Item Properties”, which can be used both with the “Goods” type and the “Material” type.

Thus, the content fields and parts of the content are two complementary and intersecting variants of the formation of content types.

Module

Most Orchard CMS functionality extensions should be created as special modules. In fact, a module is a set of extensions for Orchard, which are grouped together and located in one subfolder in the Modules directory, which is in any Orchard CMS-based website.

clip_image002[6]
Fig. 2.3. List of installed modules in the Orchard CMS admin panel

Orchard CMS offers several main modules included in the CMS core (Figure 2.3). Other modules can be downloaded from the online gallery accessible from the site administration panel (Figure 2.4).

clip_image004
Fig. 2.4. List of available modules in the Orchard CMS admin panel

Feature

Each module can contain one or several functions that represent a specific functionality. The individual functions of the modules in the Orchard CMS system can be turned on and off on demand.

clip_image006
Fig. 2.5. Management of module functions in the Orchard CMS administration panel

For example, a custom authentication module includes functions to support authentication systems OpenId, LiveId, Facebook, Twitter. Each of the functions can be disabled, so that the site developer flexibly determines the set of authentication services available to users on the site.

The functions of the modules are managed through the administration panel (Figure 2.5).

Manifest (Manifest)

A manifest is a small text file that contains a description of a module or theme for an Orchard CMS. Manifests can contain a set of parameters for the initial configuration of the module.

The following is an example of a manifest for a comment module:

Name: Comments

AntiForgery: enabled

Author: The Orchard Team

Website: orchardproject.net

Version: 0.9.0

OrchardVersion: 0.9.0

Description: The module can be applied to arbitrary Orchard content types such as blogs and pages. It includes comment validation and spam protection through the Akismet service.

Features:

Orchard.Comments:

Name: Comments

Description: Standard content item comments.

Dependencies: Settings

Category: Social

to be continued…

Source: https://habr.com/ru/post/116419/


All Articles