CMS kit provides a tag system to tag any kind of resources, like a blog post.
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 system to enable/disable CMS Kit features on development time. Alternatively, you can use the ABP Framework's Feature System to disable a CMS Kit feature on runtime.
Check the "How to Install" section of the CMS Kit Module documentation to see how to enable/disable CMS Kit features on development time.
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 class.
Example: Adding tagging support for products
Configure<CmsKitTagOptions>(options =>
{
options.EntityTypes.Add(new TagEntityTypeDefiniton("Product"));
});
If you're using the Blogging Feature, the ABP framework defines an entity type for the blog feature automatically.
CmsKitTagOptions
properties:
EntityTypes
: List of defined entity types(TagEntityTypeDefiniton
) in the tag system.
TagEntityTypeDefiniton
properties:
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/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 system provides a tag widget to display associated tags of a resource that was configured for tagging. You can simply place the widget on a page like below:
@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.
The following menu items are added by the tagging feature to the admin application:
- Tags: Opens the tag management page.
This page can be used to create, edit and delete tags for the entity types.
You can create or edit an existing tag on this page.
This module follows the Entity Best Practices & Conventions guide.
A tag represents a tag under the entity type.
Tag
(aggregate root): Represents a tag in the system.
An entity tag represents a connection between the tag and the tagged entity.
EntityTag
(entity): Represents a connection between the tag and the tagged entity.
This module follows the Repository Best Practices & Conventions guide.
Following custom repositories are defined for this feature:
ITagRepository
IEntityTagRepository
This module follows the Domain Services Best Practices & Conventions guide.
TagManager
is used to perform some operations for the Tag
aggregate root.
EntityTagManager
is used to perform some operations for the EntityTag
entity.
TagAdminAppService
(implementsITagAdminAppService
).EntityTagAdminAppService
(implementsIEntityTagAdminAppService
).TagAppService
(implementsITagAppService
).
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).
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 documentation for details.
- CmsTags
- CmsEntityTags
- CmsTags
- CmsEntityTags