Jump to:

3434 Posts in 1026 Topics by 866 members

Template Questions

SilverStripe Forums » Template Questions » Select SWF for header

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

Page: 1
Go to End
Author Topic: 375 Views
  • WaaaghNL
    Avatar
    Community Member
    4 Posts

    Select SWF for header Link to this post

    Hello all,

    i have a little problem on my mind. a time ago did i intergrade a option for a customer that he can upload an image on every page for the header.

    there for did i need to edit the mysite/code/page.php and add this

       public static $has_one = array(
          'HeaderImage' => 'Image'
       );

       function getCMSFields() {
          $fields = parent::getCMSFields();

          if(!$this->Parent){
             $fields->addFieldToTab("Root.Content.Main", new ImageField('HeaderImage'));
          }

          return $fields;
       }

    in the template file i only had to set $HeaderImage.

    Now i want te make it work for an Flash animation but changing "'HeaderImage' => 'Image'" to "'HeaderImage' => 'Flash'" Or SWF, wont work.
    is there someone who can help me with this?

    Thanks
    Ronald

    Attached Files
    375 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.