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.

Archive /

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

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

Extending SS Tutorial - Custom Field Labels Missing from CMS


Go to End


2 Posts   1827 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