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.

Customising the CMS /

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

Download image in Model Admin


Go to End


1337 Views

Avatar
swaiba

Forum Moderator, 1899 Posts

2 June 2011 at 8:36pm

Hi,

I temporarily hacked my system for this...
sapphire\templates\FileIFrameField.ss

you can probably put this in you mysite templates folder to override it without affecting the "core"

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<% base_tag %>

		<title><% _t('TITLE', 'Image Uploading Iframe') %></title>
	</head>

	<body>
		<div class="mainblock editform">
			$EditFileForm
		</div>

		<% if AttachedFile %>
			<div class="mainblock">
<!-- start hack -->
				<a href="$AttachedFile.Link" target="_new">$Name</a>
<!-- end hack -->
				$AttachedFile.CMSThumbnail

				<% if DeleteFileForm %>
					$DeleteFileForm
				<% end_if %>
			</div>
		<% end_if %>
	</body>

</html>