1

We have an existing CMS and I'm just learning how to use CraftCMS so that I port the data from SQL Server to MySQL database. I went through a few videos on how to create a basic site so I kinda understand the system.

I have used a couple of plugins to import the data and one of them being this: https://github.com/boboldehampsink/import

This plugin doesn't export existing data from MySQL data from Matrix field (using sample data). I wanted to see how the data is stored so I can create a similar format. But unfortunately the Matrix field comes back empty. I am not sure how to create and insert data in CraftCMS for this specific field. I will also at some point need to retrieve this data so I would like to know how the insert/select works on these fields.

Thanks in advance.

1

I'm not 100% clear on exactly what you're looking for, but I'll just throw this out there. Matrix content is saved in their own tables (table names are dynamically generated on a per-field basis) as opposed to most other fields, which have their content saved in the craft_content table.

You can look in MatrixService for methods needed for managing Matrix fields.

| improve this answer | |
  • I have existing data that I need to map into the Matrix field I created (Basically just Image & RTF). So the data I have from old system is in XML which I will parse and need to insert into CraftCMS. The plugin that I mentioned doesn't support import/ export of data from Matrix field. So I was wondering if there was an easy way to do this. At this point I am going to experiment with MatrixService and hope it works the way I think it should. – Subrato M Apr 27 '16 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.