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

Preview full size image in FileIFrameField


Go to End


4 Posts   1235 Views

Avatar
swaiba

Forum Moderator, 1899 Posts

20 January 2011 at 3:35am

Edited: 20/01/2011 3:35am

When using a FileIFrameField the image selected is shown as a thumbnail - if there is an attached image is there a way of seeing it full size easily?
(I imagine it's a hack to sapphire\templates\FileIFrameField.ss)

Avatar
swaiba

Forum Moderator, 1899 Posts

20 January 2011 at 3:44am

to answer my own question...


		<% if AttachedFile %>
			<div class="mainblock">
				$AttachedFile.CMSThumbnail
				<br /><a href="$AttachedFile.Link" target="_imagepreview">see full image</a>
				<% if DeleteFileForm %>
					$DeleteFileForm
				<% end_if %>
			</div>
		<% end_if %>

Avatar
pingu

Community Member, 75 Posts

23 March 2011 at 11:47pm

Is there a way to do this without hacking the core?

Avatar
swaiba

Forum Moderator, 1899 Posts

24 March 2011 at 4:49am

I'd guess that if I inherited, overrode or decorated stuff I could do it - but I was interested in short term getting a fullsize preview on that day - it's not something I put out there onto live. Still interested in any answers to this :)