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, Ed, biapar, Willr, Ingo, swaiba

Select Photo From Already Attached To Page

Go to End



Community Member, 470 Posts

26 July 2012 at 4:40am

Edited: 26/07/2012 4:45am

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.