Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS

How do I create its type for fastening to my page of the files of the type swf


Reply

5 Posts   1024 Views

Avatar
BangMan

13 May 2009 at 9:50am Community Member, 7 Posts

I created its type of the page for banner, but how I add the field for loading most banner format swf?

Avatar
Carbon Crayon

3 June 2009 at 8:47pm Community Member, 598 Posts

Hi BangMan

You can use a FileIFrameField for flash files.

Aram

Avatar
BangMan

3 June 2009 at 9:27pm Community Member, 7 Posts

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;
}

Avatar
Carbon Crayon

3 June 2009 at 10:08pm Community Member, 598 Posts

Almost, but your has_one should look like this:

static $has_one = array(
'Flash' => 'File'
);

Avatar
BangMan

4 June 2009 at 12:09am (Last edited: 4 June 2009 12:10am), Community Member, 7 Posts

thank you, shall try so