Strapi plugin logo for Copy Component

Copy Component

A Strapi plugin that allows you to copy components from another entity.

thumbnail for Copy Component

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:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module.exports = ({ env }) => ({
  // ...
  'copy-component': {
    config: {
      contentTypes: [
        'api::mycollection.mycollection',
        {
          uid: 'api::mycollection2.mycollection2',
          source: [
            'api::mycollection2.mycollection2',
            'api::mycollection3.mycollection3',
          ],
        }
      ]
    }
  }
  // ...
});

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:
1
2
3
contentTypes: [
  'api::blogpost.blogpost'
]
  • object: If you want to allow your admin users to copy components to an entity from entities in a different collection:
1
2
3
4
5
6
7
8
9
contentTypes: [
  {
    uid: 'api::navlink.navlink',
    source: [
      'api::navlink.navlink',
      'api::footerlink.footerlink',
    ],
  }
]

Install now

npm install strapi-plugin-copy-component

STATS

3 GitHub stars9 weekly downloads

Last updated

411 days ago

Strapi Version

4.9.0 and above

Author

github profile image for Freyb
Freyb

Useful links

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.