Hi there is a error in this code.
I am trying to create a image gallery with multiple pictures.
Anyone know whats wrong with the code?
Thanks
<?php
class Gallery extends Page {
private static $db = array(
'Heading' => 'Text'
);
public static $has_many = array(
'Picture' => 'Image'
);
public function getCMSFields() {
$f = parent::getCMSFields();
$f->addFieldToTab('Root.Main', new TextField('Heading'), 'Content');
$f->addFieldToTab("Root.Images", new UploadField('Picture'));
return $f;
}
}
class Gallery_Controller extends Page_Controller {
}