Skip to content

Commit

Permalink
Improved documentation for version 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
duguankui committed Aug 8, 2024
1 parent 0422ac6 commit 161534e
Show file tree
Hide file tree
Showing 51 changed files with 293 additions and 265 deletions.
20 changes: 20 additions & 0 deletions docs/en/advanced-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,23 @@ The `cms-entry-list` component has a parameter for querying entries by field val
The `GetListAsync(GetEntriesInput input)` method in `IEntryPublicAppService` accepts a string parameter named `QueryingByFieldsJson`, which represents a serialized list of `QueryingByField` objects.

In fact, internally, the `cms-entry-list` component serializes the list of `QueryingByField` objects into JSON and passes it to the `QueryingByFieldsJson` parameter of the `GetListAsync(GetEntriesInput input)` method in `IEntryPublicAppService`.

## Resolve Current Tenant by Domain Name

Dignite Cms provides the functionality to determine the current tenant based on the domain name:

1. Install the `Dignite.Cms.AspNetCore.MultiTenancy` NuGet package into the `Web Site` project.

Add `CmsAspNetCoreMultiTenancyModule` to the `[DependsOn(...)]` attribute list in your [module class](https://docs.abp.io/en/abp/latest/Module-Development-Basics).

2. Add the following configuration to the `Module` file of the `Web Site`:

```csharp
Configure<AbpTenantResolveOptions>(options =>
{
// Resolve current tenant by domain name
options.AddCmsDomainTenantResolver();
});
```

For the official documentation on determining the current tenant, please refer to: [Determining the Current Tenant](https://abp.io/docs/latest/framework/architecture/multi-tenancy#determining-the-current-tenant)
32 changes: 18 additions & 14 deletions docs/en/basic-concept.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Dignite Cms Basic Concepts

## Site Settings

Dignite Cms settings are based on the [Abp Settings](https://abp.io/docs/latest/framework/infrastructure/settings) module, which sets the language and branding information for the master and tenant sites.

Below is an example of basic settings for the master site:

```json
"Settings": {
"Abp.Localization.DefaultLanguage": "en",
"CmsSettings.Site.Languages": "en,ja,zh-Hant",
"CmsSettings.Site.Name": "My Dignite",
"CmsSettings.Site.LogoUrl":"/images/logo.png",
"CmsSettings.Site.LogoReverseUrl":"/images/logo-reverse.png"
}
```

See the [Setting Management](https://abp.io/docs/latest/modules/setting-management) documentation for tenant settings.

## Fields

Fields in Dignite CMS are implemented using [Dynamic Forms](https://learn.dignite.com/zh-Hans/abp/latest/Dynamic-Forms) in Dignite ABP. They allow developers to define fields online to meet various frontend content display needs.
Expand Down Expand Up @@ -31,20 +49,6 @@ In addition to common types of dynamic forms, Dignite CMS also provides three ad

> For more information on form usage, please refer to the quick start tutorial to launch Dignite CMS Blazor WebAssembly and experience it in the admin backend.
## Sites

A site represents a website and is used to configure its accessible features.

Dignite CMS supports multi-site features, catering to applications with subdomain or multi-domain sites.

![Edit Site](images/site-edit.png)

- Display Name: The display text of the site.
- Name: The unique identifier of the site.
- Host Address: The domain address of the website, unique throughout the system.
- Is Active: Enables or disables user access to the website.
- Language: Selects the languages supported by the website content.

## Sections

Sections are the skeleton of a website, used to partition and block website content.
Expand Down
58 changes: 24 additions & 34 deletions docs/en/fundamentals.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ This document introduces the fundamental knowledge of developing MVC websites ba

## Public Application Layer

### ISiteSettingsPublicAppService

### API

- `Task<string> GetDefaultLanguageAsync()`

Gets the default language of the website.

- `Task<IEnumerable<string>> GetAllLanguagesAsync()`

Gets all languages of the website.

- `Task<BrandDto> GetBrandAsync()`

Gets the brand information of the website.

The `Dignite.Cms.Web.Host\CmsBrandingProvider.cs` file demonstrates how to get the brand information of the website.

### IFieldPublicAppService

#### API
Expand All @@ -21,32 +39,6 @@ This document introduces the fundamental knowledge of developing MVC websites ba
- `FormControlName`: The name of the field control.
- `FormConfiguration`: The configuration of the field control.

### ISitePublicAppService

#### API

- `Task<SiteDto> FindByNameAsync(string name)`:

Find a site by its name. Returns the site information if found, otherwise returns `null`.

- `Task<SiteDto> FindByHostAsync(string host)`:

Find a site by its host address. Returns the site information if found, otherwise returns `null`.

#### Properties of `SiteDto`

- `Id`: The unique identifier of the site.
- `Name`: The unique name of the site.
- `DisplayName`: The display name of the site.
- `Host`: The host address of the site, e.g., `https://localhost:44339`.
- `IsActive`: Indicates whether the site is active.
- `Languages`: The list of languages supported by the site.

#### Extension Methods of `SiteDto`

- `SiteLanguageDto GetDefaultLanguage()`: Get the default language of the site.
- `bool LanguageCultureExists(string culture)`: Check if the specified language culture is enabled.

### ISectionPublicAppService

#### API
Expand All @@ -55,17 +47,17 @@ This document introduces the fundamental knowledge of developing MVC websites ba

Get the section information by id. Returns the section information if found, otherwise throws an exception.

- `Task<SectionDto> FindByNameAsync(Guid siteId, string name)`:
- `Task<SectionDto> FindByNameAsync(string name)`:

Find a section by its name and site id. Returns the section information if found, otherwise returns `null`.
Find a section by its name. Returns the section information if found, otherwise returns `null`.

- `Task<SectionDto> FindByEntryPathAsync(Guid siteId, string entryPath)`:
- `Task<SectionDto> FindByEntryPathAsync(string entryPath)`:

Find a section by its entry path (i.e., match the entry URL) and site id. Returns the section information if found, otherwise returns `null`.
Find a section by its entry path (i.e., match the entry URL). Returns the section information if found, otherwise returns `null`.

- `Task<SectionDto> GetDefaultAsync(Guid siteId)`:
- `Task<SectionDto> GetDefaultAsync()`:

Get the default section for the specified site.
Get the default section.

#### Properties of `SectionDto`

Expand All @@ -74,8 +66,6 @@ This document introduces the fundamental knowledge of developing MVC websites ba
- `DisplayName`: The display name of the section.
- `IsActive`: Indicates whether the section is active.
- `Type`: The type of the section (refer to [Sections](basic-concept.md#sections) for details).
- `SiteId`: The unique identifier of the site to which the section belongs.
- `Site`: The DTO of the site to which the section belongs.
- `Route`: The URL route of the entries under the section.
- `Template`: The view template for displaying entries.
- `EntryTypes`: The list of entry types in the section.
Expand Down
7 changes: 6 additions & 1 deletion docs/en/how-to-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@ Configure<AbpLocalizationOptions>(options =>

Add the CMS routing middleware `app.UseCmsRoute();` after the `app.UseMultiTenancy();` middleware.

Additionally, to work with the CMS routing feature, please remove the `app.UseAbpRequestLocalization();` middleware and then add the following code after the `app.UseRouting();` middleware:
```csharp
//Configuring CMS Routing
app.UseCmsRoute();
```

Additionally, to work with the CMS routing feature, please remove the `app.UseAbpRequestLocalization();` middleware and then add the following code befor the `app.UseCmsRoute();` middleware:

```csharp
app.UseAbpRequestLocalization(options =>
Expand Down
Binary file modified docs/en/images/entry-edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/en/images/entry-list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/en/images/entry-type-edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/en/images/fields.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/en/images/section-edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/en/images/sections.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/en/images/site-edit.png
Binary file not shown.
Binary file removed docs/en/images/sites.png
Binary file not shown.
Binary file modified docs/en/images/textedit-field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions docs/en/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,6 @@ Fields are used to define the properties of entries, and the system provides som

![Field Management Screenshot](images/fields.png)

### Site Management

Sites are used to configure the accessible features of the website, and the system automatically creates a site that supports multiple languages.

![Site Management Screenshot](images/sites.png)

### Section Management

Sections are the backbone of the site, used to support the structural layout of entries, and the system automatically creates some commonly used sections.
Expand Down
17 changes: 6 additions & 11 deletions docs/en/tag-helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ To assist web developers in quickly developing websites, Dignite Cms provides a
Basic usage:

```xml
<cms-entry-list
site-id="Model.Section.SiteId"
<cms-entry-list
section-name="blog-post"
partial-name="blog/_post-list">
</cms-entry-list>
Expand Down Expand Up @@ -48,8 +47,7 @@ Basic usage:
Return 10 entries:

```xml
<cms-entry-list
site-id="Model.Section.SiteId"
<cms-entry-list
section-name="blog-post"
current-page="10"
partial-name="blog/_post-list">
Expand All @@ -59,8 +57,7 @@ Return 10 entries:
Specify the current language:

```xml
<cms-entry-list
site-id="Model.Section.SiteId"
<cms-entry-list
section-name="blog-post"
culture="@Model.Entry.Culture"
partial-name="blog/_post-list">
Expand Down Expand Up @@ -90,8 +87,7 @@ Query by field value:
```

```xml
<cms-entry-list
site-id="Model.Section.SiteId"
<cms-entry-list
section-name="blog-post"
querying-by-fields="parameters"
partial-name="blog/_post-list">
Expand Down Expand Up @@ -126,8 +122,7 @@ Query by field value:
### Example of `cms-entry`

```xml
<cms-entry
site-id="Model.Section.SiteId"
<cms-entry
section-name="contact"
culture="@Model.Entry.Culture"
slug="index"
Expand Down Expand Up @@ -287,6 +282,6 @@ Optional parameters:
`cms-section` is used to call section data, passing the `SectionDto` type view model to the view.

```xml
<cms-section site-id="Model.Section.SiteId" section-name="blog-post" partial-name="_blog-post-index">
<cms-section section-name="blog-post" partial-name="_blog-post-index">
</cms-section>
```
20 changes: 20 additions & 0 deletions docs/ja/advanced-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,23 @@
`IEntryPublicAppService``GetListAsync(GetEntriesInput input)` メソッドは、`QueryingByFieldsJson` という名前の文字列パラメーターを受け入れます。これは `QueryingByField` オブジェクトのシリアル化されたリストを表します。

実際には、内部的に `cms-entry-list` コンポーネントは `QueryingByField` オブジェクトのリストを JSON にシリアル化し、それを `IEntryPublicAppService``GetListAsync(GetEntriesInput input)` メソッドの `QueryingByFieldsJson` パラメーターに渡します。

## ドメイン名で現在のテナントを解決する

Dignite Cms は、ドメイン名によって現在のテナントを決定する機能を提供します:

1. `Dignite.Cms.AspNetCore.MultiTenancy` NuGet パッケージを `Web Site` プロジェクトにインストールします。

`CmsAspNetCoreMultiTenancyModule`[モジュールクラス](https://docs.abp.io/en/abp/latest/Module-Development-Basics)`[DependsOn(...)]` 属性リストに追加します。

2. `Web Site``Module`ファイルに以下の設定を追加します:

```csharp
Configure<AbpTenantResolveOptions>(options =>
{
// ドメイン名で現在のテナントを解決します
options.AddCmsDomainTenantResolver();
});
```

現在のテナントを決定する公式ドキュメントについては、こちらを参照してください: [Determining the Current Tenant](https://abp.io/docs/latest/framework/architecture/multi-tenancy#determining-the-current-tenant)
32 changes: 18 additions & 14 deletions docs/ja/basic-concept.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Dignite Cms基本概念

## サイト設定

Dignite Cmsの設定は[Abp Settings](https://abp.io/docs/latest/framework/infrastructure/settings)モジュールに基づいており、マスターサイトとテナントサイトの言語とブランド情報を設定します。

以下はマスターサイトの基本設定の例です:

```json
"Settings": {
"Abp.Localisation.DefaultLanguage": "en",
"CmsSettings.Site.Languages": "en,ja,zh-Hant",
"CmsSettings.Site.Name": "My Dignite",
"CmsSettings.Site.LogoUrl":"/images/logo.png",
"CmsSettings.Site.LogoReverseUrl":"/images/logo-reverse.png"
}
```

テナントの設定については、[設定管理](https://abp.io/docs/latest/modules/setting-management)のドキュメントを参照してください。

## フィールド

Dignite CMSのフィールドは、Dignite ABPで[ダイナミックフォーム](https://learn.dignite.com/zh-Hans/abp/latest/Dynamic-Forms)を使用して実装されています。これにより、開発者はさまざまなフロントエンドコンテンツ表示ニーズに応じてオンラインでフィールドを定義できます。
Expand Down Expand Up @@ -31,20 +49,6 @@ Dignite CMSのフィールドは、Dignite ABPで[ダイナミックフォーム

> フォームの使用方法についての詳細は、Dignite CMS Blazor WebAssemblyを起動して管理者バックエンドで体験するクイックスタートチュートリアルを参照してください。
## サイト

サイトはウェブサイトを表し、そのアクセス可能な機能を構成するために使用されます。

Dignite CMSは、サブドメインまたはマルチドメインサイトを持つアプリケーションに対応する、マルチサイト機能をサポートしています。

![サイトの編集](images/site-edit.png)

- 表示名: サイトの表示テキスト。
- 名前: サイトのユニークな識別子。
- ホストアドレス: ウェブサイトのドメインアドレスで、システム全体で一意です。
- 有効: ユーザーがウェブサイトにアクセスできるかどうかを有効または無効にします。
- 言語: ウェブサイトコンテンツでサポートされる言語を選択します。

## セクション

セクションはウェブサイトの骨格であり、ウェブサイトコンテンツをパーティション化およびブロック化するために使用されます。
Expand Down
Loading

0 comments on commit 161534e

Please sign in to comment.