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?
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.
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 {
}
?>
Problem solved......I missed the <% base_tag %> in the head of my .ss file.