Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Import content from CSV or similar


Go to End


6 Posts   4685 Views

Avatar
streetdaddy

32 Posts

17 September 2008 at 12:20pm

Is there an established method for importing content from a CSV or similar? I have a large product catalogue in a spreadsheet that I'd like to populate site content from.

Avatar
Ingo

Forum Moderator, 801 Posts

25 September 2008 at 10:13pm

In our daily builds (http://dailybuilds.silverstripe.com) we have a class called CSVBulkLoader. User-level documentation is a bit sparse, but its a nice and extentable way to get CSV in the system.

Sourcecode at:
http://open.silverstripe.com/browser/modules/sapphire/trunk/dev/CsvBulkLoader.php
http://open.silverstripe.com/browser/modules/sapphire/trunk/dev/BulkLoader.php

I'm assuming you're importing SiteTree objects, e.g. for ecommerce module?
With a bit of subclassing, you should also get SiteTree-specific functionality like publishing of each new record going.

Avatar
streetdaddy

32 Posts

26 September 2008 at 12:33am

I would be importing SiteTree objects, but not into the ecommerce module, just standard templates and a simple navigation structure. The site is a product catalogue, so it will start using ecommerce in the future. For now it is just for browsing products.

Thanks for the links, I'll check out the class.

Avatar
streetdaddy

32 Posts

26 September 2008 at 12:48am

Do you have any example code for the class in use?

Avatar
S0crates9

27 Posts

19 October 2008 at 5:29am

I am curious about this too. What columns are required to getting a multiple row csv/xls sheet into the Silverstripe CMS?

Essentially it would be ideal to take pages that right now are in content form and just upload them with categories defined and possibly image locations...

Any assistance would be appreciated! A bit of a newbie in using SS in anything more than a basic form.

Avatar
colner

Community Member, 4 Posts

22 October 2008 at 5:59pm

How do you use these classes such as bulkloader. I cant find any documentation on how to use it and its tough to figure out for a beginner.