Skip to content

Freyb/strapi-plugin-copy-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UNMAINTAINED

Unfortunately, I'm no longer working on Strapi projects. Feel free to fork the project, or send PRs.

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',
    ],
  }
]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors