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.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Scaling images in ComplextTableField (CMS)


Reply

6 Posts   1527 Views

Avatar
dashiel

9 May 2008 at 6:22pm (Last edited: 9 May 2008 6:22pm), Community Member, 13 Posts

i have a ComplexTableField with two text columns and a single image column. i want the image column to show a preview/thumbnail/scaled version only. i know how to do this on the client side, but not sure on the CMS side.

cheers in advance.

Avatar
Ingo

10 May 2008 at 11:29am Forum Moderator, 801 Posts

have a look at http://doc.silverstripe.com/doku.php?id=imagefield

Avatar
Sam

10 May 2008 at 12:26pm Administrator, 685 Posts

Do you mean in the CTF's pop-up window, or in the table itself?

Avatar
dashiel

10 May 2008 at 12:37pm Community Member, 13 Posts

> Do you mean in the CTF's pop-up window, or in the table itself?

in the table itself

Avatar
Ingo

10 May 2008 at 2:11pm Forum Moderator, 801 Posts

hm, don't think anybody tried this yet, but turns out its no problem :)

see http://pastie.caboo.se/194674

see http://doc.silverstripe.com/doku.php?id=gd&s=image and http://doc.silverstripe.com/doku.php?id=imageupload on how to create your own thumbnails (size, compression, padding, ...)

Avatar
dashiel

12 May 2008 at 1:00pm Community Member, 13 Posts

thank you. this worked like a charm