Jump to:

10994 Posts in 2728 Topics by 1819 members

All other Modules

SilverStripe Forums » All other Modules » Attempting Agile Carousel Module

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1752 Views
  • theoldlr
    Community Member
    103 Posts

    Attempting Agile Carousel Module Link to this post

    I am attempting to build a module for the agile carousel (www.agilecarousel.com). This is also the first module I will have written for SilverStripe so I hope I'm not biting off more than I can chew. I started off reading the tutorial that guides you through the randomlinks module, but comments and forum posts lead me to believe that some of these methods are outdated.

    I have started to put together classes, and am using ModelAdmin for adding to the CMS (see attached). I'm hoping to gain some understanding of data relationships and using them to make the CMS interface powerful from this thread.

    My basic idea for this was to allow for creating slides in the CMS (for now enter html code with text/image). Allow for creating carousels by assigning a title(i.e. home page carousel), and finally letting the user select which slides are included on each carousel. At the moment I am getting an error when I click the create carousel button. "Fatal error: Call to a member function dataFields() on a non-object in C:\website\cs\sapphire\forms\Form.php on line 821"

    I'm assuming this is because of a bad relationship. Here is my code so far:


    class AgileCarouselAdmin extends ModelAdmin {

    public static $managed_models = array(
    static $url_segment = 'agilecarousel';
    static $menu_title = 'Agile Carousel';


    class Carousel extends DataObject {

    static $db = array (
    'Title' => 'Varchar'

    static $has_many = array(
    'Slides' => 'Slide'

    function getCMSFields_forPopup() {
    $fields = new FieldSet();
    $fields->push( new TextField('Title') );
    return $fields;

    function getCMSfields() {
    $fields = parent::getCMSFields();

    $tablefield = new HasOneComplexTableField (
    'Title' => 'Title'



    class Slide extends DataObject {
    static $db = array(
    'Title' => 'Varchar',
    'Code' => 'HTMLText'

    Expertise, tutorials, references--any help is really appreciated!

    Attached Files
  • davidm2010
    Community Member
    107 Posts

    Re: Attempting Agile Carousel Module Link to this post

    This is exactly what is needed to improve the looks of a home page. I wish I understood this better, I would help. But it is what is needed. If you get it solved, please post here.


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.