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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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


629 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