Jump to:

23377 Posts in 18296 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » Add Flash to Page - but above Content box

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

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

Page: 1
Go to End
Author Topic: 2221 Views
  • Valorinbattle
    Avatar
    Community Member
    95 Posts

    Add Flash to Page - but above Content box Link to this post

    I'm trying to find a way to add a flash element to my homepage (HomePage.ss 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

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Add Flash to Page - but above Content box Link to this post

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

  • Valorinbattle
    Avatar
    Community Member
    95 Posts

    Re: Add Flash to Page - but above Content box Link to this post

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

  • mandrew
    Avatar
    Core Development Team
    32 Posts

    Re: Add Flash to Page - but above Content box Link to this post

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

  • Valorinbattle
    Avatar
    Community Member
    95 Posts

    Re: Add Flash to Page - but above Content box Link to this post

    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

  • silvernick
    Avatar
    Community Member
    4 Posts

    Re: Add Flash to Page - but above Content box Link to this post

    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...)

    2221 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.