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.

Archive /

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

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

Three separate images in Homepage Banner

Go to End



31 Posts

23 February 2008 at 9:23am

Edited: 23/02/2008 9:35am


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.