Adding content from a non-C5 site to a C5 site.

Permalink 1 user found helpful
Hi, I have a client whom has a lot on content on a existing website, features, blogs, etc, They all have a title, short description, image and main text. The data is stored in an MySQL database with tables for each content type with the row headers of id, title, short_description, text, image, timestamp.

The client wants the old content available on the new C5 site I'm developing for them.
What is the best way to do this?

Could I for example simply create a SQL statement and insert the old blogs directly into the C5 database where the blogs data is stored.

Or do I have to insert the old database tables into the C5 database and create single pages which access and display the old content in an archive section.

Any advice would to appreciated, thank.

 
Job replied on at Permalink Best Answer Reply 1 Attachment
Job
Look at dynamically creating pages here:http://www.concrete5.org/documentation/developers/pages/overview... and then use attributes to store the data.

'title' would become cName
'short_description' would become cDescription
'text' would become (not sure on this one, you'll have to have a look around)
'timestamp' would become cPublicDate

Its definitely possible - our old news was all in a database and I wrote an import script as a single page which I have included, however do notice that I've used some custom attributes (eg: scoutnews_content).

I would suggest only using mine as a reference, not a base.

Good luck.
LaZion replied on at Permalink Reply
Thanks for your help, will give it a try.
HarryVienna replied on at Permalink Reply
HarryVienna
A little late, bur perhaps it helps:

When you install C5, you can use sample content. Here you find a tutorial:
http://andrewembler.com/posts/concrete5-5.5-content-import-format-s...

So all you need is to convert the old content to the proper XML format. I did it in this way:
- Create some sample pages in C5 for every page type you have.
- Use this Addon to create the XML:http://www.concrete5.org/marketplace/addons/sample-content-generato...
- Use this XML as a base to write the converter.

In this way I could import my complete old website with about 600 pages, many pictures, attributes etc...

Cheers
Harald