hmm, looks like ive got started on the wrong foot, please review the below code for my BikePage.php and let me know what i have done wrong, this is the original that produces $image - $image10
<?php
class BikePage extends Page {
static $db = array(
'Make' => 'Text',
'Model' => 'Text',
'Eng' => 'Text',
'MaxSpeed' => 'Text',
'Colours' => 'Text',
'Wheels' => 'Text',
'Length' => 'Text',
'Width' => 'Text',
'Height' => 'Text',
);
static $has_one = array(
'Photo' => 'Image',
'Photo1' => 'Image',
'Photo2' => 'Image',
'Photo3' => 'Image',
'Photo4' => 'Image',
'Photo5' => 'Image',
'Photo6' => 'Image',
'Photo7' => 'Image',
'Photo8' => 'Image',
'Photo9' => 'Image',
'Photo10' => 'Image',
);
public function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Images", new UploadField('Photo'));
$fields->addFieldToTab("Root.Images", new UploadField('Photo1'));
$fields->addFieldToTab("Root.Images", new UploadField('Photo2'));
$fields->addFieldToTab("Root.Images", new UploadField('Photo3'));
$fields->addFieldToTab("Root.Images", new UploadField('Photo4'));
$fields->addFieldToTab("Root.Images", new UploadField('Photo5'));
$fields->addFieldToTab("Root.Images", new UploadField('Photo6'));
$fields->addFieldToTab("Root.Images", new UploadField('Photo7'));
$fields->addFieldToTab("Root.Images", new UploadField('Photo8'));
$fields->addFieldToTab("Root.Images", new UploadField('Photo9'));
$fields->addFieldToTab("Root.Images", new UploadField('Photo10'));
$fields->addFieldToTab("Root.Info", new TextField('Make'));
$fields->addFieldToTab("Root.Info", new TextField('Model'));
$fields->addFieldToTab('Root.Info', new TextField('Eng'));
$fields->addFieldToTab('Root.Info', new TextField('MaxSpeed'));
$fields->addFieldToTab('Root.Info', new TextField('Colours'));
$fields->addFieldToTab('Root.Info', new TextField('Wheels'));
$fields->addFieldToTab('Root.Info', new TextField('Length'));
$fields->addFieldToTab('Root.Info', new TextField('Height'));
$fields->addFieldToTab('Root.Info', new TextField('Width'));
$config = GridFieldConfig_RelationEditor::create();
$BikeTypeField = new GridField(
'BikeType',
'BikeType',
$this->BikeType(),
GridFieldConfig_RelationEditor::create());
$fields->addFieldToTab('Root.BikeType', $BikeTypeField);
return $fields;
}
static $many_many = array(
'BikeType' => 'BikeType'
);
}
class BikePage_Controller extends Page_Controller {
}
Thanks
Nick
p.s when i try to change the code for the above i get errors regarding redeclare and unexpect t string when i run dev/build