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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Default editable text inside header


Reply

409 Views

Avatar
Mrfixer

3 July 2011 at 7:36pm (Last edited: 4 July 2011 4:04am), Community Member, 49 Posts

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