Jump to:

10929 Posts in 2613 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » KickAssets has_one Image question

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 383 Views
  • Hello_electro
    Avatar
    Community Member
    80 Posts

    KickAssets has_one Image question Link to this post

    Hi

    This question is probably for UncleCheese

    I am using your KickAssets plugin which works great. But I am curious why it is not affecting the standard upload for a basic $has_one array.

    static $has_one = array(
    'FBHolderImage' => 'Image'
    );

    Should this be using the new kickassets interface as well?

  • Hello_electro
    Avatar
    Community Member
    80 Posts

    Re: KickAssets has_one Image question Link to this post

    Nevermind!

    Solved below: Use FileAttachmentField

    static $has_one = array(
       'FBHolderImageNew' => 'File'
    );
       function getCMSFields() {
    $fields = parent::getCMSFields();
       $fields->addFieldToTab("Root.Content.FaceBookHolder", new FileAttachmentField('FBHolderImageNew', null, null, null, null, "FaceBookImages"));

    return $fields;
    }

    383 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.