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   1556 Views

Avatar
dashiel

Community Member, 13 Posts

9 May 2008 at 6:22pm

Edited: 09/05/2008 6:22pm

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

Forum Moderator, 801 Posts

10 May 2008 at 11:29am

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

Avatar
Sam

Administrator, 685 Posts

10 May 2008 at 12:26pm

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

Avatar
dashiel

Community Member, 13 Posts

10 May 2008 at 12:37pm

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

in the table itself

Avatar
Ingo

Forum Moderator, 801 Posts

10 May 2008 at 2:11pm

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

Community Member, 13 Posts

12 May 2008 at 1:00pm

thank you. this worked like a charm