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.

All other Modules

Discuss all other Modules here.

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

KickAssets has_one Image question


Reply

2 Posts   413 Views

Avatar
Hello_electro

18 December 2011 at 12:07pm Community Member, 80 Posts

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?

Avatar
Hello_electro

18 December 2011 at 12:10pm Community Member, 80 Posts

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;
}