OK I've done as you've said but I still just get an error after the build :(
I am putting my php files in mysite/code and they are as follows:
MyImageGalleryItem.php
<?php
class MyGallery extends ImageGalleryPage
{
protected $itemClass = "MyImageGalleryItem";
}
class MyImageGalleryItem extends ImageGalleryItem
{
static $db = array (
'PaintingName' => 'Varchar(100)',
'PaintingDimensions' => 'Varchar(50)',
'Media' => 'Varchar(50)' ,
'Sold' => 'Boolean'
// etc...
);
public function getCMSFields_forPopup()
{
$f = parent::getCMSFields_forPopup();
$f->push(new TextField('PaintingName','Name of painting'));
$f->push(new TextField('PaintingDimensions','Dimensions of painting'));
$f->push(new TextField('Media','Media'));
$f->push(new CheckboxField('Sold','This painting is sold'));
return $f;
}
}
?>
and MyImageGalleryPage.php
<?php
class MyImageGalleryPage extends ImageGalleryPage {
protected $itemClass = "MyImageGalleryItem";
}
class MyImageGalleryPage_Controller extends ImageGallery_Controller {
}
?>
Do you see what I'm doing wrong!? its the last feature I need for the site, so your help is fantastic thanks!!