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

Preview full size image in FileIFrameField


Reply


4 Posts   870 Views

Avatar
swaiba

Forum Moderator, 1799 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, 1799 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, 1799 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 :)