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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Select Photo From Already Attached To Page


Reply

251 Views

Avatar
Liam

26 July 2012 at 4:40am (Last edited: 26 July 2012 4:45am), Community Member, 470 Posts

I have a page that has the ability to add numerous images to it with UploadField

public static $many_many = array(
    'Images' => 'Image'
   );

$f = new UploadField('Images', 'Photos');

I want the user to be able to select a default photo to be used in the template side of things. So I want to setup another field where the user can pick from the photos already attached to the page and this can be called specifically on the template.

Unless somebody has a better idea.