strapi-plugin-copy-component
v1.0.1
Published
A Strapi plugin that allows you to copy components from another entity.
Downloads
20
Readme
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
:
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:
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:
contentTypes: [
{
uid: 'api::navlink.navlink',
source: [
'api::navlink.navlink',
'api::footerlink.footerlink',
],
}
]