Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » Three separate images in Homepage Banner

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 877 Views
  • Todd
    31 Posts

    Three separate images in Homepage Banner Link to this post


    I'm pretty sure this is very simple, I just don't know how to do it.

    I created three tabs in Silverstripe's CMS in order to upload three pictures into my HomePage Banner:

    static $has_one = array(
       'Banner_Image1' => 'Image',
       'Banner_Image2' => 'Image',
       'Banner_Image3' => 'Image'

    function getCMSFields() {
       $fields = parent::getCMSFields();
       $fields->addFieldToTab("Root.Content.MiddleContent", new HtmlEditorField("MiddleContent", "Middle Content"));
       $fields->addFieldToTab("Root.Content.RightContent", new HtmlEditorField("RightContent", "Right Content"));
       $fields->addFieldToTab("Root.Content.Banner_Image1", new ImageField('Banner_Image1'));
       $fields->addFieldToTab("Root.Content.Banner_Image2", new ImageField('Banner_Image2'));
       $fields->addFieldToTab("Root.Content.Banner_Image3", new ImageField('Banner_Image3'));
       return $fields;

    Now, I want to have the pictures show concurrently WITHOUT any spaces.

    I can't do this:


    Any Ideas?

    I see I posted this in the wrong forum, My Apologies.


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.