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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Images Issues


Go to End


3 Posts   1412 Views

Avatar
jigster

Community Member, 15 Posts

19 April 2009 at 11:40am

Hi I am using version 2.3.0 and I can use the content field in my CMS on my homepage to insert images which works fine. However on my other page types Only text will show in the published page. Images show up in the CMS content field but do not display on the web....All I get is white space...Can anyone give me advice on the issue?

Avatar
jigster

Community Member, 15 Posts

19 April 2009 at 11:51am

for reference my php for the page types are as follows:

<?php
/**
* Defines the HomePage page type
*/

class HomePage extends Page {
static $db = array(

'ContentTwo'=> 'HTMLText'
);

static $has_one = array(
);

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

$fields->addFieldToTab('Root.Content.Main', new HtmlEditorField('ContentTwo', 'Content Two'));

return $fields;
}

}

class HomePage_Controller extends Page_Controller {

}

?>

<?php
/**
* Defines the WhatWeDo page type
*/
class WhatWeDo extends Page {
static $db = array(

'Content2'=>'HTMLText',
'Content3'=>'HTMLText',
'Content4'=>'HTMLText',
'Content5'=>'HTMLText'
);

static $has_one = array(
);

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

$fields->addFieldToTab('Root.Content.Main', new HtmlEditorField('Content2', 'Content 2'));
$fields->addFieldToTab('Root.Content.Main', new HtmlEditorField('Content3', 'Content 3'));
$fields->addFieldToTab('Root.Content.Main', new HtmlEditorField('Content4', 'Content 4'));
$fields->addFieldToTab('Root.Content.Main', new HtmlEditorField('Content5', 'Content 5'));

return $fields;
}

}

class WhatWeDo_Controller extends Page_Controller {
}

?>

Avatar
jigster

Community Member, 15 Posts

19 April 2009 at 12:23pm

Problem solved......I missed the <% base_tag %> in the head of my .ss file.