21309 Posts in 5738 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 82 Views |
-
*** Solved *** 2.4.9 ImageDataObjectManage

15 February 2013 at 12:28am Last edited: 15 February 2013 12:32am
Hi
ImageDataObjectManage used to work on other sites, but on a new site using 2.4.9 and the same dataobject manager adding this code generates an error in the CMS
$fields->addFieldToTab('Root.Content.Images', new ImageDataObjectManager(
$this,
'Photos',
'Photo',
'Image',
array('Title'=>'Title', 'Image'=>'Image')
)
);Obviousely I have:
static $has_many = array(
'Photos'=>'Photo'
);
Is there a workaround?
-
Re: *** Solved *** 2.4.9 ImageDataObjectManage

15 February 2013 at 1:01am
I needed to add the data object for my gallery photos
<?php
class Photo extends DataObject {
static $db = array(
'Title' => 'Varchar(128)'
);
static $has_one = array(
'Image'=>'Image',
'ParentPage'=>'Page'
);
}
| 82 Views | ||
|
Page:
1
|
Go to Top |

