Question

According to paragraphs documentation, it's should be possible to export paragraph bundles with features module, but whatever I search, I can't find any option in the features component section for doing this.

Paragraphs documentation

Features:
This module has some overlapping function with field_collection, but this module has some advantages over field_collection.

  • Different fields per paragraph bundle
  • Using different paragraph bundles in a single paragraph field
  • Displays per paragraph bundle
  • Bundles are exportable with features.
  • Entities, so: exportable field bases/instances, usable to show in Search API, used in Views

It seems that features not treated the same for every paragraph types because I can't see paragraph type in the features component section for some of the created paragraph types.

Était-ce utile?

La solution

Paragraphs in D8 are entity types. So to create a feature with a paragraph bundle definition, you will need at least:

  • The paragraph type definition
  • The Entity form display
  • The Entity view display
  • The field instances you use.
  • Core override fields.
  • Optionally, you will need the field storage definitions.. but generally it is best to put these in a separate feature like core since fields can be used in multiple places.

The easiest way to get all these is to create a new feature and search for paragraph.[type-machine-name]. E.g. I have a paragraph type named banner, so I created a paragraph_banner feature by searching for paragraph.banner and adding the results.

Licencié sous: CC-BY-SA avec attribution
Non affilié à drupal.stackexchange
scroll top