Jump to:

5513 Posts in 1732 Topics by 1218 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Custom pages to manage external database

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1065 Views
  • tallrobphilp
    Avatar
    Community Member
    9 Posts

    Custom pages to manage external database Link to this post

    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.

  • zenmonkey
    Avatar
    Community Member
    527 Posts

    Re: Custom pages to manage external database Link to this post

    That would be possible, but migrating the database might be easier using a Custom CSV importer http://doc.silverstripe.org/sapphire/en/howto/csv-import

    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

  • tallrobphilp
    Avatar
    Community Member
    9 Posts

    Re: Custom pages to manage external database Link to this post

    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?

  • zenmonkey
    Avatar
    Community Member
    527 Posts

    Re: Custom pages to manage external database Link to this post

    There may be some good starting points on http://ssbits.com, plus the regular tutorial section has a good simple form tutorial http://doc.silverstripe.org/sapphire/en/tutorials/3-forms

    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

    1065 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.