Copy Component
A Strapi plugin that allows you to copy components from another entity.
Strapi plugin strapi-plugin-copy-component
A Strapi plugin that allows you to copy components from another entity.
Installation
# using yarn
yarn add strapi-plugin-copy-component
# using npm
npm install strapi-plugin-copy-component --save
Then in your config/plugins.js
:
1module.exports = ({ env }) => ({
2 // ...
3 'copy-component': {
4 config: {
5 contentTypes: [
6 'api::mycollection.mycollection',
7 {
8 uid: 'api::mycollection2.mycollection2',
9 source: [
10 'api::mycollection2.mycollection2',
11 'api::mycollection3.mycollection3',
12 ],
13 }
14 ]
15 }
16 }
17 // ...
18});
contentTypes
can contain strings or objects:
- string: If you want to allow your admin users to copy components to an entity from another entity in the same collection:
1contentTypes: [
2 'api::blogpost.blogpost'
3]
- object: If you want to allow your admin users to copy components to an entity from entities in a different collection:
1contentTypes: [
2 {
3 uid: 'api::navlink.navlink',
4 source: [
5 'api::navlink.navlink',
6 'api::footerlink.footerlink',
7 ],
8 }
9]
Install now
npm install strapi-plugin-copy-component
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.