Jump to:

796 Posts in 409 Topics by 304 members


SilverStripe Forums » Widgets » Slideshow widget

Discuss SilverStripe Widgets.

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

Page: 1 2
Go to End
Author Topic: 4589 Views
  • jpmcc
    Community Member
    14 Posts

    Re: Slideshow widget Link to this post

    This is exactly what I was looking for. Just a few tweaks:

    $options = array();

    I changed to :

    $options = '<option value="0">Please select an image</option>';

    to provide an empty selection, otherwise the first image is already selected, and if it was saved, potentially the wrong image would be saved.

    Also just to note that when adding the field to the widget, the image field ID should be specified, so if:

    //My Widget

    static $has_one = array(
    'MyWidgetImage' => 'Image'

    //when adding the field

    $widgetImageField = new WidgetImageField('MyWidgetImageID', 'My Widget Image');

    Cheers for sharing this!

  • bartvanirsel
    Community Member
    94 Posts

    Re: Slideshow widget Link to this post

    thanks! old topic but it really helped me out!

Page: 1 2
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.