Craft CMS Asked on June 19, 2021
I’ve been asked to export some data from an old EEv2 site into a Craft site. I thought I should be able to export the data from EE into CSV or XML and then use FeedMe to import it.
But one of the fields on the EE site was using Content Elements which is similar to Matrix or the EE Fluid field.
So before I convert that data into a format that is compatible with EE6, I need to know what format it should be in to get it into Craft.
The Content Elements field was made of headings, an Assets field, a pill field which set alignment for the image, and a Wygwam (RTE) field.
Is the best option to set this up as a Matrix field in EE? Or would I be better using a Fluid field?
Also, has anyone done any exports from EE to Craft using Smart Export which involved Matrix fields in Craft? If so, any things to look out for?
I have found that the best format for me is XML, it's easy to write and read. I've moved a number of EE2 sites to Craft by writing export templates using XML and importing into Craft with Feedme.
It's relatively simple, but can be tedious and time consuming as there are often tweaks needed either in the XML or the feedme settings.
I have a blog article I wrote a while ago that may help. Importing Entries into a Multi Lingual Craft CMS Website
I did not use the Smart Export Pro plugin but wrote my XML export templates by hand, I wasn't aware of that this existed.
I haven't used Content Elements but you say that it is similar to Craft Matrix so in that case I would look at the docs for importing into a Matrix field.https://docs.craftcms.com/feed-me/v4/guides/importing-into-matrix.html#setup-your-feed.
I have used this once to import into Craft 3 from a Craft 2 site with the code below. You should be able to use this as a model for your EE feed that you want to put into a Craft matrix. Below is the relevant bit from a larger feed.
<recollection_asset_type_matrix>
{% for block in entry.recollectionAssetType %}
<matrix_block>
{% switch block.type %}
{# video #}
{% case "video" %}
<subtitle_file>{{ block.subtitleFile.first().url() }}</subtitle_file>
<subtitle_label><![CDATA[{{ block.subtitleLabel }}]]></subtitle_label>
<vimeo_url><![CDATA[{{ block.vimeoFilmURL }}]]></vimeo_url>
<runtime><![CDATA[{{ block.runTime }}]]></runtime>
<poster_image>{{ block.posterImage.first().url() }}</poster_image>
{# picture gallery #}
{% case "pictureGallery" %}
<gallery_bg_image>{{ block.backgroundImage.first().url() }}</gallery_bg_image>
<gallery_audio_file>{{ block.audioFile.first().url() }}</gallery_audio_file>
<gallery_images>
{% for image in block.images %}
<image>{{ image.url() }}</image>
{% endfor %}
</gallery_images>
{# memoir #}
{% case "memoir" %}
<memoir_tagline><![CDATA[{{ block.tagline }}]]></memoir_tagline>
<memoir_bg_image>{{ block.backgroundImage.first().url() }}</memoir_bg_image>
<memoir_copy><![CDATA[{{ block.copy }}]]></memoir_copy>
<memoir_audio_file>{{ block.audioFile.first().url() }}</memoir_audio_file>
{% endswitch %}
</matrix_block>
{% endfor %}
</recollection_asset_type_matrix>
Unfortunately this import is long done so I am unable to take screenshots of the feedme settings.
Correct answer by CreateSean on June 19, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP