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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Add Flash to Page - but above Content box

Go to End

6 Posts   2660 Views


Community Member, 95 Posts

26 February 2009 at 3:02pm

I'm trying to find a way to add a flash element to my homepage ( page type). I know how to add flash so that it shows up in the content box. But I'm trying to add it much as the ImageBanner is added so that it can appear above the content box.
ImageBanner isn't letting me upload a flash element. Is there another way of doing this?

~ James


Administrator, 690 Posts

26 February 2009 at 4:33pm

You probably want to use a FileIFrameField rather than an ImageField.


Community Member, 95 Posts

26 February 2009 at 4:36pm

Thanks Sam. Is there a tutorial that shows me how to add a FileIFrameField?


Community Member, 37 Posts

26 February 2009 at 6:29pm

Not really, but it works very similarly to the ImageField.


Community Member, 95 Posts

28 February 2009 at 12:34pm

Okay, so I followed the tutorial about making a BannerImage and tried to adjust it for a FileIFrameField.
Three questions:

1. The tutorial says to add this:

static $has_one = array(
'BannerImage' => 'Image'

So would mine say:
static$has_one = array(
'FlashBanner' => 'Image'

or would there be something else in the place of 'Image'?

2. The field "FlashBanner" shows up in the CMS and prompts me to add a file either from my computer or the file store.
But when I add the .swf file, it does not show it in the CMS as it does when I add an image for BannerImage. So why doesn't it show up?

3. The flash banner does not show up on the actual site. It does however show me the name of the file. Why the name and not the actual flash element?

Any help would be awesome!

~ James


Community Member, 4 Posts

10 April 2009 at 3:00am

Maybe it is because a Flash file is not an image. It needs to be embedded with <embed> tags and it also takes a heap of other statements. I know it defeats the purpose of a CMS but if you're using it for your own web site (which will in all likelihood not even need a CMS) why not enter the HTML for your Flash straight into the template? (Until you know how to better integrate Flash into the template of course...)