Revised the CMS kit documents

pull/9124/head
Halil İbrahim Kalkan 4 years ago
parent 0624d7342b
commit 0d5dce51c1

@ -2,15 +2,51 @@
The blogging feature provides the necessary UI to manage and render blogs and blog posts.
## Internals
## User Interface
Menu Items
### Menu Items
The following menu items are added by the blogging feature to the admin application:
* **Blogs**: Blog management page.
* **Blog Posts**: Blog post management page.
## Pages
### Blogs
Blogs page is used to create and manage blogs in your system.
![blogs-page](../../images/cmskit-module-blogs-page.png)
A screenshot from the new blog creation modal:
![blogs-edit](../../images/cmskit-module-blogs-edit.png)
**Slug** is the URL part of the blog. For this example, the root URL of the blog becomes *https://your-domain.com/blogs/technical-blog/*.
#### Blog Features
Blog feature uses some of the other CMS Kit features. You can enable or disable the features by clicking the features action for a blog.
![blogs-feature-action](../../images/cmskit-module-blogs-feature-action.png)
You can select/deselect the desired features for blog posts.
![features-dialog](D:\Github\abp\docs\en\images\cmskit-module-features-dialog.png)
### Blog Post Management
When you create blogs, you can manage blog posts on this page.
![blog-posts-page](D:\Github\abp\docs\en\images\cmskit-module-blog-posts-page.png)
You can create and edit an existing blog post on this page. If you enable specific features such as tags, you can set tags for the blog post on this page.
![blog-post-edit](D:\Github\abp\docs\en\images\cmskit-module-blog-post-edit.png)
## Internals
### Domain Layer
#### Aggregates
@ -33,9 +69,9 @@ This module follows the [Repository Best Practices & Conventions](https://docs.a
This module follows the [Domain Services Best Practices & Conventions](https://docs.abp.io/en/abp/latest/Best-Practices/Domain-Services) guide.
- `BlogManager`: Includes some operations for `Blog` aggregate root to keep data consistency.
- `BlogPostManager`: Includes some operations for `BlogPost` aggregate root such as creating & updating.
- `BlogFeatureManager`: Includes some operations for managing blog features.
- `BlogManager`
- `BlogPostManager`
- `BlogFeatureManager`
### Application layer
@ -43,7 +79,7 @@ This module follows the [Domain Services Best Practices & Conventions](https://d
##### Common
- `BlogFeatureAppService` _(implements I`BlogFeatureAppService`)_
- `BlogFeatureAppService` _(implements `IBlogFeatureAppService`)_
##### Admin

@ -1,23 +1,10 @@
# Comment System
# CMS Kit: Comments
CMS kit provides a **comment** system to add comments feature to any kind of resource, like blog posts, products, etc. This section describes the details of the comments system.
CMS kit provides a **comment** system to add comments feature to any kind of resource, like blog posts, products, etc.
## Feature
## Options
CMS kit uses the [global feature](https://docs.abp.io/en/abp/latest/Global-Features) system for all implemented features. Commercial startup templates come with all the CMS kit related features are enabled by default, if you create the solution with public website option. If you're installing the CMS kit manually or want to enable the comment feature individually, open the `GlobalFeatureConfigurator` class in the `Domain.Shared` project and place the following code to the `Configure ` method.
```csharp
GlobalFeatureManager.Instance.Modules.CmsKit(cmsKit =>
{
cmsKit.Comments.Enable();
});
```
# Options
## CmsKitCommentOptions
You can use the comment system to add comments to any kind of resources, like blog posts, products etc. Comment system provides a mechanism to group comment definitions by entity types. For example, if you want to use comment system for blog posts and products, you need to define two entity types named `BlogPosts` and `Product`, and add comments under these entity types.
The comment system provides a mechanism to group comment definitions by entity types. For example, if you want to use comment system for blog posts and products, you need to define two entity types named `BlogPosts` and `Product`, and add comments under these entity types.
`CmsKitCommentOptions` can be configured in the domain layer, in the `ConfigureServices` method of your [module](https://docs.abp.io/en/abp/latest/Module-Development-Basics). Example:
@ -38,9 +25,43 @@ Configure<CmsKitCommentOptions>(options =>
- `EntityType`: Name of the entity type.
# Internals
## The Comments Widget
The comment system provides a commenting [widget](../../UI/AspNetCore/Widgets.md) to allow users to send comments to resources on public websites. You can simply place the widget on a page like below.
```csharp
@await Component.InvokeAsync(typeof(CommentingViewComponent), new
{
entityType = "Product",
entityId = "..."
})
```
`entityType` was explained in the previous section. `entityId` should be the unique id of the product, in this example. If you have a Product entity, you can use its Id here.
## User Interface
### Menu Items
## Domain Layer
The following menu items are added by the commenting feature to the admin application:
* **Comments**: Opens the comment management page.
### Pages
#### Comment Management
You can view and manage comments on this page.
![comment-page](../../images/cmskit-module-comment-page.png)
You can also view and manage replies on this page.
![comments-detail](../../images/cmskit-module-comments-detail.png)
## Internals
### Domain Layer
#### Aggregates
@ -101,17 +122,3 @@ See the [connection strings](https://docs.abp.io/en/abp/latest/Connection-String
- **CmsComments**
### MVC UI
The comment system provides a commenting widget to allow users to send comments to resources on public websites. You can simply place the widget on a page like below.
```csharp
@await Component.InvokeAsync(typeof(CommentingViewComponent), new
{
entityType = "entityType",
entityId = "entityId"
})
```
You need to specify entity type and entity ID parameters. Entity type represents the group name you specified while defining the comments in the domain module. Entity ID represents the unique identifier for the resource that users send comments to, such as blog post ID or product ID.
For more information about widgets see [widgets](https://docs.abp.io/en/abp/latest/UI/AspNetCore/Widgets) documentation.

@ -2,7 +2,7 @@
This module provides CMS (Content Management System) capabilities for your application. It provides **core building blocks** and fully working **sub-systems** to create your own website with CMS features enabled, or use the building blocks in your web sites with any purpose.
> **This module currently available only for the MVC UI**. While there is no official Blazor package, it can also work in a Blazor Server UI since a Blazor Server UI application is actually a hybrid application that runs within the MVC UI.
> **This module currently available only for the MVC / Razor Pages UI**. While there is no official Blazor package, it can also work in a Blazor Server UI since a Blazor Server UI is actually a hybrid application that runs in an ASP.NET Core MVC / Razor Pages application.
The following features are currently available:
@ -55,98 +55,6 @@ CMS kit packages are designed for various usage scenarios. If you check the [CMS
- `Volo.CmsKit.Public.*` packages contain the functionalities used in public websites where users read blog posts or leave comments.
- `Volo.CmsKit.*` (without Admin/Public suffix) packages are called as unified packages. Unified packages are shortcuts for adding Admin & Public packages (of the related layer) separately. If you have a single application for administration and public web site, you can use these packages.
## The User Interface
### Menu items
CMS Kit module admin side adds the following items to the main menu, under the *CMS* menu item:
* **Pages**: Page management page.
* **Tags**: Tag management page.
* **Comments**: Comment management page.
`CmsKitAdminMenus` class has the constants for the menu item names.
### Pages
### Page Management
Pages page is used to manage dynamic pages in the system.
![pages-page](../../images/cmskit-module-pages-page.png)
You can create or edit an existing page on this page.
![pages-edit](../../images/cmskit-module-pages-edit.png)
* When you create a page, you can access the created page via `pages/{slug}` URL.
### Blog Management
Blogs page is used to create and manage blogs in your system.
![blogs-page](../../images/cmskit-module-blogs-page.png)
A screenshot from the new blog creation modal:
![blogs-edit](../../images/cmskit-module-blogs-edit.png)
#### Blog Features
You can enable or disable a specific feature for blogs by clicking the features action.
![blogs-feature-action](../../images/cmskit-module-blogs-feature-action.png)
You can select/deselect the desired features for blog posts.
![features-dialog](../../images/cmskit-module-features-dialog.png)
### Blog Post Management
When you create blogs, you can manage blog posts on this page.
![blog-posts-page](../../images/cmskit-module-blog-posts-page.png)
You can create and edit an existing blog post on this page. If you enable specific features such as tags, you can set tags for the blog post on this page.
![blog-post-edit](../../images/cmskit-module-blog-post-edit.png)
### Tag Management
CMS Kit provides an extensible tagging mechanism to add tagging capabilities to various places.
![tags-page](../../images/cmskit-module-tags-page.png)
You can create or edit an existing tag on this page.
![tag-edit](../../images/cmskit-module-tag-edit.png)
### Comment Management
CMS Kit provides an extensible commenting mechanism to add comments to various places. You can add comment control to anywhere you want and manage the comments.
You can view and manage comments on this page.
![comment-page](../../images/cmskit-module-comment-page.png)
You can manage and view replies on this page.
![comments-detail](../../images/cmskit-module-comments-detail.png)
### Reactions
CMS Kit provides an extensible reaction component system to allow users to send reactions to your content. Here how the reactions component looks on a sample page.
![reactions](../../images/cmskit-module-reactions.png)
You can also customize the reaction icons shown in the reaction component.
### Ratings
You can use the rating component to add rating a mechanism to your content. Here how the rating component looks on a sample page.
![ratings](../../images/cmskit-module-ratings.png)
## Internals
### Table / collection prefix & schema

@ -1,3 +1,27 @@
# CMS Kit: Pages
This document is in progress...
CMS Kit Page system allows you to create dynamic pages by specifying URLs, which is the fundamental feature of a CMS.
## The User Interface
### Menu items
CMS Kit module admin side adds the following items to the main menu, under the *CMS* menu item:
* **Pages**: Page management page.
`CmsKitAdminMenus` class has the constants for the menu item names.
### Pages
#### Page Management
Pages page is used to manage dynamic pages in the system.
![pages-page](D:\Github\abp\docs\en\images\cmskit-module-pages-page.png)
You can create or edit an existing page on this page.
![pages-edit](D:\Github\abp\docs\en\images\cmskit-module-pages-edit.png)
When you create a page, you can access the created page via `/pages/{slug}` URL.

@ -1,23 +1,12 @@
# Rating System
CMS kit provides a **rating** system to to add ratings feature to any kind of resource like blog posts, comments, etc. This section describes the details of the rating system.
CMS kit provides a **rating** system to to add ratings feature to any kind of resource like blog posts, comments, etc. Here how the rating component looks like on a sample page:
## Feature
![ratings](../../images/cmskit-module-ratings.png)
CMS kit uses the [global feature](https://docs.abp.io/en/abp/latest/Global-Features) system for all implemented features. Commercial startup templates come with all the CMS kit related features are enabled by default, if you create the solution with the public website option. If you're installing the CMS kit manually or want to enable the rating feature individually, open the `GlobalFeatureConfigurator` class in the `Domain.Shared` project and place the following code to the `Configure ` method.
## Options
```csharp
GlobalFeatureManager.Instance.Modules.CmsKit(cmsKit =>
{
cmsKit.Ratings.Enable();
});
```
# Options
## CmsKitRatingOptions
You can use the rating system to to add ratings to any kind of resource, like blog posts, comments, etc. The rating system provides a mechanism to group ratings by entity types. For example, if you want to use the rating system for products, you need to define an entity type named `Product` and then add ratings under the defined entity type.
The rating system provides a mechanism to group ratings by entity types. For example, if you want to use the rating system for products, you need to define an entity type named `Product` and then add ratings under the defined entity type.
`CmsKitRatingOptions` can be configured in the domain layer, in the `ConfigureServices` method of your [module](https://docs.abp.io/en/abp/latest/Module-Development-Basics). Example:
@ -38,6 +27,20 @@ Configure<CmsKitRatingOptions>(options =>
- `EntityType`: Name of the entity type.
## MVC UI
The ratings system provides a rating widget to allow users send ratings to resources in public websites. You can simply place the widget on a page like below.
```csharp
@await Component.InvokeAsync(typeof(RatingViewComponent), new
{
entityType = "Product",
entityId = "entityId"
})
```
`entityType` was explained in the previous section. `entityId` should be the unique id of the product, in this example. If you have a Product entity, you can use its Id here.
# Internals
## Domain Layer
@ -99,18 +102,3 @@ See the [connection strings](https://docs.abp.io/en/abp/latest/Connection-String
##### Collections
- **CmsRatings**
### MVC UI
The ratings system provides a rating widget to allow users send ratings to resources in public websites. You can simply place the widget on a page like below.
```csharp
@await Component.InvokeAsync(typeof(RatingViewComponent), new
{
entityType = "entityType",
entityId = "entityId"
})
```
You need to specify entity type and entity ID parameters. Entity type represents the group name you specified while defining the reactions in the domain module. Entity ID represents the unique identifier for the resource that users give ratings to, such as blog post ID or product ID.
For more information about widgets see [widgets](https://docs.abp.io/en/abp/latest/UI/AspNetCore/Widgets) documentation.

@ -1,23 +1,16 @@
# Reaction System
CMS kit provides a **reaction** system to add reactions feature to any kind of resource, like blog posts or comments. This section describes the details of the reaction system.
CMS kit provides a **reaction** system to add reactions feature to any kind of resource, like blog posts or comments.
## Feature
Reaction component allows users to react to your content via pre-defined icons/emojis. Here how the reactions component may looks like:
CMS kit uses the [global feature](https://docs.abp.io/en/abp/latest/Global-Features) system for all implemented features. Commercial startup templates come with all the CMS kit related features are enabled by default, if you create the solution with the public website option. If you're installing the CMS kit manually or want to enable reaction feature individually, open the `GlobalFeatureConfigurator` class in the `Domain.Shared` project and place the following code to the `Configure ` method.
![reactions](../../images/cmskit-module-reactions.png)
```csharp
GlobalFeatureManager.Instance.Modules.CmsKit(cmsKit =>
{
cmsKit.Reactions.Enable();
});
```
# Options
You can also customize the reaction icons shown in the reaction component.
## CmsKitReactionOptions
## Options
You can use the reaction system to to add reactions feature to any kind of resource, like blog posts or comments, etc. The reaction system provides a mechanism to group reactions by entity types. For example, if you want to use the reaction system for products, you need to define an entity type named `Product`, and then add reactions under the defined entity type.
Reaction system provides a mechanism to group reactions by entity types. For example, if you want to use the reaction system for products, you need to define an entity type named `Product`, and then add reactions under the defined entity type.
`CmsKitReactionOptions` can be configured in the domain layer, in the `ConfigureServices` method of your [module](https://docs.abp.io/en/abp/latest/Module-Development-Basics). Example:
@ -39,16 +32,30 @@ Configure<CmsKitReactionOptions>(options =>
});
```
> If you're using the comment or blog features, the ABP framework defines predefined reactions for these features automatically. You can easily override or remove the predefined reactions in `Configure` method like shown above.
> If you're using the comment or blog features, the ABP framework defines predefined reactions for these features automatically.
`CmsKitReactionOptions` properties:
- `EntityTypes`: List of defined entity types(`CmsKitReactionOptions`) in the reaction system.
- `EntityTypes`: List of defined entity types (`CmsKitReactionOptions`) in the reaction system.
`ReactionEntityTypeDefinition` properties:asdas
`ReactionEntityTypeDefinition` properties:
- `EntityType`: Name of the entity type.
- `Reactions`: List of defined reactions(`ReactionDefinition`) in the entity type.
- `Reactions`: List of defined reactions (`ReactionDefinition`) in the entity type.
## The Reactions Widget
The reaction system provides a reaction widget to allow users to send reactions to resources. You can place the widget on a page like below:
```csharp
@await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new
{
entityType = "Product",
entityId = "..."
})
```
`entityType` was explained in the previous section. `entityId` should be the unique id of the product, in this example. If you have a Product entity, you can use its Id here.
# Internals
@ -111,18 +118,3 @@ See the [connection strings](https://docs.abp.io/en/abp/latest/Connection-String
##### Collections
- **CmsUserReactions**
### MVC UI
The reaction system provides a reaction widget to allow users to send reactions to resources on public websites. You can place the widget on a page like below.
```csharp
@await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new
{
entityType = "entityType",
entityId = "entityId"
})
```
You need to specify entity type and entity ID parameters. Entity type represents the group name you specified while defining the reactions in the domain module. Entity ID represents the unique identifier for the resource that users give reactions to, such as blog post ID or product ID.
For more information about widgets see [widgets](https://docs.abp.io/en/abp/latest/UI/AspNetCore/Widgets) documentation.

@ -1,25 +1,14 @@
# Tag Management
CMS kit provides a **tag** system to tag any kind of resources, like blog posts. This section describes the details of the tag system.
CMS kit provides a **tag** system to tag any kind of resources, like a blog post.
## Feature
## Options
CMS kit uses the [global feature](https://docs.abp.io/en/abp/latest/Global-Features) system for all implemented features. Commercial startup templates come with all the CMS kit related features are enabled by default, if you create the solution with public website option. If you're installing the CMS kit manually or want to enable the tag management feature individually, open the `GlobalFeatureConfigurator` class in the `Domain.Shared` project and place the following code to the `Configure ` method.
The tag system provides a mechanism to group tags by entity types. For example, if you want to use the tag system for blog posts and products, you need to define two entity types named `BlogPosts` and `Product` and add tags under these entity types.
```csharp
GlobalFeatureManager.Instance.Modules.CmsKit(cmsKit =>
{
cmsKit.Tags.Enable();
});
```
# Options
`CmsKitTagOptions` can be configured in the domain layer, in the `ConfigureServices` method of your [module](https://docs.abp.io/en/abp/latest/Module-Development-Basics) class.
## CmsKitTagOptions
You can use the tag system to tag any kind of resources, like blog posts, products, etc. The tag system provides a mechanism to group tags by entity types. For example, if you want to use the tag system for blog posts and products, you need to define two entity types named `BlogPosts` and `Product` and add tags under these entity types.
`CmsKitTagOptions` can be configured in the domain layer, in the `ConfigureServices` method of your [module](https://docs.abp.io/en/abp/latest/Module-Development-Basics). Example:
**Example: Adding tagging support for products**
```csharp
Configure<CmsKitTagOptions>(options =>
@ -28,7 +17,7 @@ Configure<CmsKitTagOptions>(options =>
});
```
> If you're using the blog feature, the ABP framework defines an entity type for the blog feature automatically. You can easily override or remove the predefined entity types in `Configure` method like shown above.
> If you're using the blog feature, the ABP framework defines an entity type for the blog feature automatically.
`CmsKitTagOptions` properties:
@ -38,13 +27,47 @@ Configure<CmsKitTagOptions>(options =>
- `EntityType`: Name of the entity type.
- `DisplayName`: Display name of the entity type. You can use a user friendly display name to show entity type definition on the admin website.
- `CreatePolicies`: List of policy names allowing users to create tags under the entity type.
- `UpdatePolicies`: List of policy names allowing users to update tags under the entity type.
- `DeletePolicies`: List of policy names allowing users to delete tags under the entity type.
- `CreatePolicies`: List of policy/permission names allowing users to create tags under the entity type.
- `UpdatePolicies`: List of policy/permission names allowing users to update tags under the entity type.
- `DeletePolicies`: List of policy/permission names allowing users to delete tags under the entity type.
## The Tag Widget
The tag system provides a tag [widget](../../UI/AspNetCore/Widgets.md) to display associated tags of a resource that was configured for tagging. You can simply place the widget on a page like below:
```csharp
@await Component.InvokeAsync(typeof(TagViewComponent), new
{
entityType = "Product",
entityId = "..."
})
```
`entityType` was explained in the previous section. `entityId` should be the unique id of the product, in this example. If you have a Product entity, you can use its Id here.
## User Interface
### Menu Items
# Internals
The following menu items are added by the tagging feature to the admin application:
## Domain Layer
* **Tags**: Opens the tag management page.
### Pages
#### Tag Management
This page can be used to create, edit and delete tags for the entity types.
![tags-page](../../images/cmskit-module-tags-page.png)
You can create or edit an existing tag on this page.
![tag-edit](../../images/cmskit-module-tag-edit.png)
## Internals
### Domain Layer
#### Aggregates
@ -87,9 +110,9 @@ This module follows the [Domain Services Best Practices & Conventions](https://d
#### Application services
- `TagAdminAppService` (implements `ITagAdminAppService`): Implements the use cases of tag management.
- `EntityTagAdminAppService` (implements `IEntityTagAdminAppService`): Implements the use cases of entity tag relationship.
- `TagAppService` (implements `ITagAppService`): Implements the use cases of entity tag relationship for public websites.
- `TagAdminAppService` (implements `ITagAdminAppService`).
- `EntityTagAdminAppService` (implements `IEntityTagAdminAppService`).
- `TagAppService` (implements `ITagAppService`).
### Database providers
@ -111,7 +134,6 @@ See the [connection strings](https://docs.abp.io/en/abp/latest/Connection-String
- CmsTags
- CmsEntityTags
- CmsTags
#### MongoDB
@ -119,17 +141,3 @@ See the [connection strings](https://docs.abp.io/en/abp/latest/Connection-String
- **CmsTags**
- **CmsEntityTags**
### MVC UI
The tag system provides a tag widget to display associated tags of the resource on public websites. You can simply place the widget on a page like below.
```csharp
@await Component.InvokeAsync(typeof(TagViewComponent), new
{
entityType = "entityType",
entityId = "entityId"
})
```
For more information about widgets see [widgets](https://docs.abp.io/en/abp/latest/UI/AspNetCore/Widgets) documentation.
Loading…
Cancel
Save