Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Create: Faq document #789

Merged
merged 4 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added en/images/cmskit-module-faq-edit-page.png
berkansasmaz marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
EnesDONER marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added en/images/cmskit-module-faq-page.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 added en/images/cmskit-module-faq-widget.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
128 changes: 128 additions & 0 deletions en/modules/cms-kit/faq.md
EnesDONER marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# FAQ System

The CMS kit provides a **FAQ** system to allow users to create, edit and delete FAQ's. Here is a screenshot of the FAQ widget:

![cmskit-module-faq-widget](../../images/cmskit-module-faq-widget.png)

## Enabling the FAQ System

By default, CMS Kit features are disabled. Therefore, you need to enable the features you want, before starting to use it. You can use the [Global Feature](https://docs.abp.io/en/abp/latest/Global-Features) system to enable/disable CMS Kit features on development time. Alternatively, you can use the ABP Framework's [Feature System](https://docs.abp.io/en/abp/latest/Features) to disable a CMS Kit feature on runtime.

> Check the ["How to Install" section of the CMS Kit Module documentation](index.md#how-to-install) to see how to enable/disable CMS Kit features on development time.

## User Interface

### Menu Items

CMS Kit module admin side adds the following items to the main menu, under the **CMS** menu item:

**FAQ's**: FAQ management page.

`CmsKitProAdminMenus` class has the constants for the menu item names.

### Pages

You can list, create, update and delete FAQ's on the admin side of your solution.

![faq-page](../../images/cmskit-module-faq-page.png)
![faq-edit-page](../../images/cmskit-module-faq-edit-page.png)
![faq-edit-question-page](../../images/cmskit-module-faq-edit-question-page.png)

## Faq Widget

The FAQ system provides a FAQ [widget](https://docs.abp.io/en/abp/latest/UI/AspNetCore/Widgets) for users to display FAQ's. You can place the widget on a page like below:

```csharp
@await Component.InvokeAsync(
typeof(FaqViewComponent),
new
{
groupName = "group1",
name = ""
})
```

## Options

Before using the FAQ system, you need to define groups. You can use `FaqOptions`. `FaqOptions` can be configured at the domain layer, in the `ConfigureServices` method of your [module](https://docs.abp.io/en/abp/latest/Module-Development-Basics).

```csharp
Configure<FaqOptions>(options =>
{
options.AddGroups("group1");
options.AddGroups("group2");
options.AddGroups("group3");
});
```

`FaqOptions` properties:

- `GroupName`: List of defined groups in the FAQ system. The `options.AddGroups` method is a shortcut to add a new group to this list.

## Internals

### Domain Layer

#### Aggregates

This module follows the [Entity Best Practices & Conventions](https://docs.abp.io/en/abp/latest/Best-Practices/Entities) guide.

##### FAQ

A FAQ represents a generated FAQ with its questions:

- `FaqSection` (aggregate root): Represents a FAQ by including the options in the system.
- `FaqQuestion` (entity): Represents the defined FAQ questions related to the FAQ in the system.

#### Repositories

This module follows the guidelines of [Repository Best Practices & Conventions](https://docs.abp.io/en/abp/latest/Best-Practices/Repositories).

The following special repositories are defined for these features:

- `IFaqSectionRepository`
- `IFaqQuestionRepository`


#### Domain services

This module follows the [Domain Services Best Practices & Conventions](https://docs.abp.io/en/abp/latest/Best-Practices/Domain-Services) guide.


### Application layer

#### Application services

- `FaqAdminAppService` (implements `IFaqAdminAppService`): Implements the use cases of FAQ management for admin side.
- `FaqPublicAppService` (implements `IFaqPublicAppService`): Implements the use cases of FAQ's for public websites.

### Database providers

#### Common

##### Table / collection prefix & schema

All tables/collections use the `Cms` prefix by default. Set static properties on the `CmsKitDbProperties` class if you need to change the table prefix or set a schema name (if supported by your database provider).

##### Connection string

This module uses `CmsKit` for the connection string name. If you don't define a connection string with this name, it fallbacks to the `Default` connection string.

See the [connection strings](https://docs.abp.io/en/abp/latest/Connection-Strings) documentation for details.

#### Entity Framework Core

##### Tables

- CmsFaqSections
- CmsFaqQuestions

#### MongoDB

##### Collections

- **CmsFaqSections**

## Entity Extensions

Check the ["Entity Extensions" section of the CMS Kit Module documentation](index.md#entity-extensions) to see how to extend entities of the FAQ Feature of the CMS Kit Pro module.
29 changes: 15 additions & 14 deletions en/modules/cms-kit/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,26 @@ This module extends the [open-source CMS Kit module](https://docs.abp.io/en/abp/

> **This module is currently available for MVC / Razor Pages and Blazor UIs**.

The following features are provided by the open source CMS Kit module:
The following features are provided by the open-source CMS Kit module:

- [**Page**](https://docs.abp.io/en/abp/latest/Modules/Cms-Kit/Pages) management system to manage dynamic pages with dynamic URLs.
- [**Blogging**](https://docs.abp.io/en/abp/latest/Modules/Cms-Kit/Blogging) system to create publish blog posts with multiple blog support.
- [**Blogging**](https://docs.abp.io/en/abp/latest/Modules/Cms-Kit/Blogging) system to create and publish blog posts with multiple blog support.
- [**Tagging**](https://docs.abp.io/en/abp/latest/Modules/Cms-Kit/Tags) system to tag any kind of resource, like a blog post.
- [**Comment**](https://docs.abp.io/en/abp/latest/Modules/Cms-Kit/Comments) system to add comments feature to any kind of resource, like blog post or a product review page.
- [**Comment**](https://docs.abp.io/en/abp/latest/Modules/Cms-Kit/Comments) system to add comments feature to any kind of resource, like a blog post or a product review page.
- [**Reaction**](https://docs.abp.io/en/abp/latest/Modules/Cms-Kit/Reactions) system to add reactions (smileys) feature to any kind of resource, like a blog post or a comment.
- [**Rating**](https://docs.abp.io/en/abp/latest/Modules/Cms-Kit/Ratings) system to add rating feature to any kind of resource.
- [**Rating**](https://docs.abp.io/en/abp/latest/Modules/Cms-Kit/Ratings) system to add a rating feature to any kind of resource.
- [**Menu**](https://docs.abp.io/en/abp/latest/Modules/Cms-Kit/Menus) system to manage public menus dynamically.
- [**Global resources**](https://docs.abp.io/en/abp/latest/Modules/Cms-Kit/Global-Resources) system to add global styles and scripts dynamically.
- [**Dynamic widget**](https://docs.abp.io/en/abp/latest/Modules/Cms-Kit/Dynamic-Widget) system to create dynamic widgets for page and blog posts.

And the following features are provided by the CMS Kit pro version:
The following features are provided by the CMS Kit Pro version:

* [**Newsletter**](newsletter.md) system to allow users to subscribe to newsletters.
* [**Contact form**](contact-form.md) system to allow users to write messages to you.
* [**URL forwarding**](url-forwarding.md) system to create URLs that redirect to other pages or external websites.
* [**Poll**](poll.md) system to create quick polls for users
* [**Page Feedback**](page-feedback.md) system to allow users to send feedback about pages.
* [**Newsletter**](newsletter.md) It allows users to subscribe to newsletters.
* [**Contact form**](contact-form.md) It allows users to write messages to you.
* [**URL forwarding**](URL-forwarding.md) It allows the creation of URLs that point to other pages or external websites.
* [**Poll**](poll.md) It allows to create simple polls for your visitors.
* [**Page Feedback**](page-feedback.md) It allows users to send feedback for your pages.
* [**Faq**](faq.md) system to create dynamic FAQ.

Click on a feature to understand and learn how to use it. See [the module description page](https://commercial.abp.io/modules/Volo.CmsKit.Pro) for an overview of the module features.

Expand Down Expand Up @@ -59,7 +60,7 @@ GlobalFeatureManager.Instance.Modules.CmsKitPro(cmsKitPro =>

Alternatively, you can enable features individually, like `cmsKit.Comments.Enable();`.

> If you are using Entity Framework Core, do not forget to add a new migration and update your database.
> If you are using Entity Framework Core, remember to add a new migration and update your database.


## Entity Extensions
Expand Down Expand Up @@ -113,12 +114,12 @@ public static void ConfigureExtraProperties()

* `ConfigureCmsKitPro` method is used to configure the entities of the CMS Kit Pro module.

* `cmsKit.ConfigurePoll(...)` is used to configure the **Poll** entity of the CMS Kit Pro module. You can add or update your extra properties of the **Poll** entity.
* `cmsKit.ConfigurePoll(...)` is used to configure the **Poll** entity of the CMS Kit Pro module. You can add or update the extra properties of the **Poll** entity.

* `cmsKit.ConfigureNewsletterRecord(...)` is used to configure the **NewsletterRecord** entity of the CMS Kit Pro module. You can add or update your extra properties of the **NewsletterRecord** entity.
* `cmsKit.ConfigureNewsletterRecord(...)` is used to configure the **NewsletterRecord** entity of the CMS Kit Pro module. You can add or update the extra properties of the **NewsletterRecord** entity.

* You can also set some validation rules for the property that you defined. In the above sample, `RequiredAttribute` and `StringLengthAttribute` were added for the property named **"NewsletterRecord"**.

* When you define the new property, it will automatically add to **Entity**, **HTTP API** and **UI** for you.
* Once you define a property, it appears in the create and update forms of the related entity.
* New properties also appear in the datatable of the related page.
* New properties also appear in the data table on the related page.