Jump to:

23481 Posts in 18965 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Hasmanycomplextablefield problems / fast help appreciated

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

Page: 1
Go to End
Author Topic: 1696 Views
  • lazerscience
    Avatar
    Community Member
    16 Posts

    Hasmanycomplextablefield problems / fast help appreciated Link to this post

    Hi,
    I'm new to silverstripe and right now working on my first project which should be done in a few days.
    I just encountered some problems with the Hasmanycomplexfield...

    1. I have multiple pictures assigned to a project. If I upload a picture it's displayed in the hasmany...table, but I cant change it in size!
    The code

    $imagesfield->setFieldFormatting(array('Image' => '$Image.SetWidth(100)'));

    which appeared logical to me, doesnt work (just shows .SetWidth(100) on the table cell!

    2. Is there a fast way to change the bahaviour of the image uploader in the popup so that you dont have to save before adding the file (i wouldnt need any preveiw there)?

    3. In the template I can't get Image Resizing working.. I'm trying

    $Image.SetSize(150,150)

    but I'm just getting the error message [Warning] Missing argument 1 for Image::SetSize(). Seems to me that there is a problem handling more than one argument in the template? I was not able to find any descent documentation about it, but is it also the right syntax to just seperate the twovalues via comma?

    I'd appreciate any help, since I should finish this site (which is my first SS project) soon... Learned really a lot already and I'm quite impressed by SS!
    Thanks!

    Thanks!

  • Ricardona
    Avatar
    Community Member
    26 Posts

    Re: Hasmanycomplextablefield problems / fast help appreciated Link to this post

    3. I'm using $Image.CMSThumbnail

    1696 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.