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

Avatar
Hello_electro

Community Member, 80 Posts

18 December 2011 at 12:07pm

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

Community Member, 80 Posts

18 December 2011 at 12:10pm

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