This project is read-only.

Importing Existing Data

Topics: Customizing Orchard, General, Installing Orchard, Troubleshooting, Writing modules
Oct 18, 2011 at 12:01 PM

Just wondered if anybody has imported existing data into an Orchard application?

I have created a couple of Content Types and some Taxonomies, gone through all the styling and its almost there!  However I now need to import some existing data, which I have in some tables in the db.  First of all I thought I would generate an xml file to import, however, not all the Custom Fields support the import functionality.

Do I look at implementing the Import functionality or go to the backend, bypassing orchard, and attempt to write the sql to insert the data?

Any ideas/experiences?


Oct 18, 2011 at 7:44 PM

Sure, many times. What I usually do is that I model the target content types in Orchard, then create some dummy items and export that. Then, I generate a file using this as a template and import the results.

If there are fields you need that don't support import, you could always fix them and contribute a patch.

Bypassing import and write your own SQL would be crazy, as import is plenty extensible.

Oct 18, 2011 at 7:53 PM

Ok thanks I have used this method to create a recipe with dummy data, just wasn't sure about transforming existing sql data rows.

I will look patching up the fields and generating the xml.