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.

Customising the CMS

Custom pages to manage external database


4 Posts   1096 Views


13 July 2011 at 10:58pm Community Member, 9 Posts

First off - generally very impressed with Silverstripe, one of very few "true" CMS that actually have data modelling and a clean separation from template layer, so congrats to the developers.

Basically we are considering rebuilding a site which has a huge and complex database, and I'm not convinced it's a realistic proposition to try to migrate the whole thing to Silverstripe data model. However, if I could utilise the excellent Silverstripe API to essentially create CRUD interface to an external database that would be great.

Is this a realistic idea? For example, create a page that lists thousands of records from external DB in a grid in the same format as would be displayed with ModelAdmin? And then allow editing of individual records in style of Silverstripe but with data going back and forth to external DB.

Many thanks in advance.


15 July 2011 at 6:39am Community Member, 528 Posts

That would be possible, but migrating the database might be easier using a Custom CSV importer

I've used it to create product Databases and even automatically populate the Image relations. Granted I've only done it on DBs of 1200 records. I'm even using silverstripe to create DBs for iPhone apps this way


16 July 2011 at 1:24am Community Member, 9 Posts

Thanks for the CVS import link, might be an option even though our DB is very big and complex.

However, what I'm really interested in is the general idea of having custom CMS pages, how to have forms, list data, how to go about getting a form to post to the back-end, process, and then return some data back to the page etc.

I suppose it's as much about understanding the MVC and executionj pipeline so I can learn how to add these custom pages. We would need to add a lot of custom pages to match up to the functionality of current homebrew CMS.

Are there good tutorials that cover custom CMS pages that aren't jsut about plain model CRUD? Something to show how to create a form, post the data to a controller etc?


16 July 2011 at 2:02am Community Member, 528 Posts

There may be some good starting points on, plus the regular tutorial section has a good simple form tutorial

Plus the two books are helpful.

What you're looking for is actually relatively easy to implement in SS. Well compared to building a CMS from scratch :) since SS has some pretty robust tools for forms. And if you can't find the code you need on SS Bits or in the modules the Forums and IRC are your best resource.

Good Luck