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, biapar, Willr, Ingo, simon_w

Extending SS Tutorial - Custom Field Labels Missing from CMS


Reply


2 Posts   1539 Views

Avatar
Aaron

Community Member, 63 Posts

25 May 2008 at 2:27pm

Hi,

I've worked through the Extending Silverstripe Tute and am busy creating my own data type for storing Travel Tours.

I'm currently trying to create a Teaser content item on the Main Content Panel of the CMS. The field is showing up there, but it has no Label above it.

Here is my code, largely taken from the Tutorial above:

class Tour extends Page {

static $db = array(
      'TourTeaser' => 'Text'
   );

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

$fields->addFieldToTab( 'Root.Content.Main', new TextareaField('TourTeaser'), 'Content' );

return $fields;
}

Have I done something wrong there?

Avatar
Aaron

Community Member, 63 Posts

25 May 2008 at 2:33pm

Got it - this post covers the above:
http://silverstripe.com/site-builders-forum/flat/3487