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

Default editable text inside header


Go to End


689 Views

Avatar
Mrfixer

Community Member, 49 Posts

3 July 2011 at 7:36pm

Edited: 04/07/2011 4:04am

Hi, im wanting to create my header so that it can be edited on a page per page basis (this i know how to do), but is there a way that on creation of this header i can add a default text that can populate the db for all of these pages, then should the Web editor require a different text he/she can override it for a particular page?..

This is how i understand it should work:

  $fields->addFieldToTab("Root.Content.HeaderText", new HTMLEditorField( 'HeaderText', 'Text In The Header', 20, 20, 'My Default Text Here' ));

Regards