![]() ![]() Having imported the Paragraph entities already, we then need to import the host entities, attaching the appropriate Paragraphs to each one’s field_paragraph_type_content field. To give some context, this assumes the feed being consumed has a root level with an elements array filled with content arrays with properties like element_id and element_content, and we want to convert those content arrays into Paragraphs of type paragraph_type in Drupal, with the field_paragraph_type_content field storing the text that came from the element_content property. Plugin: 'entity_reference_revisions:paragraph' However, you didn’t configure your Paragraph reference field as a conventional Entity Reference one, but as an Entity reference revisions field, so you need to use an appropriate plugin.Īn example of the core of a migration of Paragraph entities: source:įield_paragraph_type_content/value: content This is critical because you can be tempted to use something more common like entity:paragraph which would make sense given that Paragraphs are entities. ![]() Plugin: ‘entity_reference_revisions:paragraph’ However, a very important caveat is making sure to use the right destination plugin, provided by the Entity Reference Revisions module: destination: You can migrate Paragraph entities in a way very similar to the way of migrating every other entity type into Drupal 8. Migrating Paragraphs needs to be done in at least two steps: 1) migrating entities of type Paragraph, and 2) migrating entities referencing imported Paragraph entities. Sometimes we draw relationships between the element being imported and an already imported one of a different type, but we never handle the migration of both simultaneously. That means we implement a single migration for each entity type. In Drupal 8, individual migrations are built around an entity type. If we talk about Paragraphs, it goes without saying that they are to be attached to other entities. However, they are special in that they make no sense without a host entity. Paragraphs is a powerful Drupal module that makes gives editors more flexibility in how they design and layout the content of their pages.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |