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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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


524 Views

Avatar
Liam

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.