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 1 commit
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 faqs. 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:

**Faqs**: Faq management page.

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

### Pages

You can list, create, update and delete faqs 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 faqs. 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 faqs 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.
1 change: 1 addition & 0 deletions en/modules/cms-kit/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ And the following features are provided by the CMS Kit pro version:
* [**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.
* [**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