Import/Export your Content

How to Import / Export your Contents ?

It is possible to export some contents from one Magento instance and import them into another environment. You can also import some content from other platforms like Wordpress.

The format to import/export Contents files is .csv

Important : before importing any content, please make sure you have imported the corresponding Content types before.

Defining the identifier

To manage import/export of contents, it is necessary to give them a unique attribute. This attribute already exists for content types as the attribute ‘identifier’ is common to all the different environments.

Regarding the Contents, we have to define which attribute will be the reference (identifier). The import/export identifier for Contents defines the condition of the updates of Contents, i.e to determine if the Content as to be created or updated.

  • First step is to set the identifier in the Content Type configuration. Main Menu → Content → Content Types → select the content type from the grid. Then Import/Export Contents Settings : Content Identifier Name : (mandatory field) is the name of the column of the identifier value in the export file. Content Default Identifier Value : You can give it a default value. It is possible to override this value in the settings of the Content itself.

Now you can import or export your contents.

Exporting Contents

You can also export all the Contents at once, or only those selected in the grid (using massaction).

Importing Contents

You can override the default identifier value in the Content itself, select Import and add the identifier that will be specific to this unique content.

Reminder, to import contents, make sure you have imported the corresponding content type first.

Then from the grid, select Import Contents.

Select the .csv file to updload. Import Identifier Column Name : this field is prefilled with the identifier your added during the first step.

Importing/Exporting Repeater fields

If your content type contains a Repeater field, its repeated values are also included in the export/import CSV, in a single column:

  • The column header combines the repeater field identifier with the identifiers of its sub-fields, e.g. images|title,name,url for a repeater field "images" containing sub-fields "title", "name" and "url".
  • The cell contains every repeated entry of that content, each entry being the sub-field values joined together, and entries separated from each other. With the default separators, this looks like: titleA,nameA,urlA|titleB,nameB,urlB.

The separators used to build this column (repeater identifier / attribute codes separator, attribute codes separator, entries separator, and values separator) are configurable in System Configuration — change them if your data may contain the default characters (| or ,).

Limitation: nested repeaters (a repeater field used as a sub-field of another repeater field) are not supported by import/export — the nested repeater's sub-fields are not expanded in the column header, so their data cannot be reliably exported or re-imported.

--

Loading...