745 Posts in 310 Topics by 288 members
| Go to End | ||
| Author | Topic: | 3961 Views |
-
Re: Slideshow widget

10 November 2011 at 6:34am
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!
| 3961 Views | ||
| Go to Top |


