I created its type of the page for banner, but how I add the field for loading most banner format swf?
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Hi BangMan
You can use a FileIFrameField for flash files.
Aram
Like here?
class SWFPage extends Page {
static $db = array(
'Description' => 'Text',
);
static $has_one = array(
'Flash' => 'FileIFrameField',
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Main", new FileIFrameField("Flash",_t('SWFPage.Flash','Flash'), "", $this));
return $fields;
}
Almost, but your has_one should look like this:
static $has_one = array(
'Flash' => 'File'
);
thank you, shall try so