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:

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


1123 Views

Avatar
Todd

31 Posts

23 February 2008 at 9:23am

Edited: 23/02/2008 9:35am

Hi,

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:

$Banner_Image1$Banner_Image2$Banner_Image3

Any Ideas?

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

Thanks