Content Tags
A Strapi plugin that allows you to add custom tags to your content.
Strapi Plugin Content Tags
A Strapi plugin that allows you to add custom tags to your content.
Installation
# using yarn
yarn add strapi-plugin-content-tags
# using npm
npm install strapi-plugin-content-tags --saveTo allow tags on a collection type, edit \
./src/api/[content-type-name]/content-types/[content-type-name]/schema.json
1{
2 "pluginOptions": {
3 "i18n": { ... },
4 "content-tags": {
5 "fieldName": "Tags",
6 "tags": {
7 "None": { "color": "neutral" },
8 "Done": { "color": "success" },
9 "In progress": { "color": "primary" },
10 "Error": { "color": "danger" }
11 },
12 "defaultTag": "None"
13 }
14 },
15
16 ...
17
18 "attributes": {
19 ...
20 "Tags": {
21 "type": "customField",
22 "customField": "plugin::content-tags.content-tags"
23 }
24 ...
25 }
26}The pluginOption section lets you configure the the tags of the collection type.
fieldNameis a reference to the field you have specified in theattributessection.tagsis an objects of which the keys are the labels of the tags and the values need to contain the following properties:color: The display color of the badge. It is passed to a Status component. \ Possible values: alternative, danger, neutral, primary, secondary, success, warning.
defaultTag: A key intagsthat will be assigned to entities by default.
In the attributes section you need to define a field, using the provided custom component. You can do that by either editing schema.json manually or adding it through Content-Type Builder.
Todo
- Add an editor to Advanced settings of Content-Type Builder where you can setup the tags.
Install now
npm install strapi-plugin-content-tags
Create your own plugin
Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.