Advertising sustains the DA. Ads are hidden for members. Join today

Mapping to a Paragraph field

Last updated on
10 August 2019

Note: This is originally written for Feeds Paragraphs version 8.x-1.x but should be easy to follow for the 7.x-1.x version as well.

Step 1: Install Feeds Paragraphs module
in this step we will assume you already downloaded and enabled Feeds and Paragraphs modules

The best way to quickly install Feeds Paragraphs is through Drush,

but if you don't want to use it, then let's do it manually:

  • Download Feeds Paragraphs module
  • Extract its content to /sites/modules
  • Go to /admin/modules and enable Feeds Paragraphs

Step 1: Add the text field

  • Go to /admin/structure/paragraphs_type and click "Add paragraph type" button.
  • Let's call it maybe "Details Bundle"?, click "Save and manage fields".
  • Click "Add field".
  • Select "Text (plain)" from the drop down menu and enter "Name" for the label.
  • Click "Save and continue".
  • For the "Allowed number of values" field, select "Limited" and enter 1, then click "Save field settings".
  • Click "Save settings".
     

Step 2: Add new Paragraph field

  • Go to /admin/structure/types/manage/article/fields and click "Add field" button.
  • From the drop down menu select "Paragraph".
  • Let's call it "Details", click "Save and continue".
  • for "Type of item to reference" field, select "Paragraph", select "Limited" and enter 1, then click "Save field settings".
  • Under "REFERENCE TYPE" section, select the bundle we just added "Details Bundle"
  • Click "Save settings".
     

Step 3: Add new Feed Type

  • Go to /admin/structure/feeds/add
  • Let's call it "Article Importer".
  • for the "Fetcher" select "Upload file".
  • for "Parser", select "CSV"
  • for "Processor", select "Node", then select "Article" for "Content type".
  • Click "Save and add mappings".
     

Step 4: Mapping to the text field
in this step you will need to create a CSV file, containing 2 headers "title", and "text":
 

title text
My Article Dummy text

Mapping:
in this page the module will provide a new target, in this case: "Name (field_details:details_bundle:field_name)",

obviously the field "Name" is the field inside the bundle we created in step 1, lets start mapping:

  • Select "Title" from the targets list, then select "New CSV Source"  for the source and enter "title".
  • Click "Save".
  • Select "Name (field_details:details_bundle:field_name)" from the targets list.
  • Select "New CSV Source" for the source, enter "text".
  • Click "Save".

Step 3: Importing

  • Go to "/admin/content/feed" and click "Add feed"
  • Click on "Article Importer"
  • Enter "Article Feed" for the "Title"
  • for "File", select the CSV file you created.
  • Click "Save and import".
  • You should see "Created 1 Article" success message
  • Go to "/admin/content" and you should see "My Article", click on it
  • Now you should see "This is a dummy text" under the "Name" field

Help improve this page

Page status: No known problems

You can: