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:

Customising the CMS /

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

custom template

Go to End

4 Posts   1082 Views


Community Member, 211 Posts

8 October 2009 at 4:55am


When I want to create new template I always extend Page, wich goes with a "content " tab on the HTML editor.
I also know how to create another Tab by insterting a new html field in my template.

My problem is now the following :

I Need to create another template with a content Tab but I don't want it to be the "original" content tab but a spécific one.

How can I do that without rmoving it from Page wich I presume would remove it everywhere

Thanks for any clue



Community Member, 283 Posts

8 October 2009 at 4:38pm

The easiest solution would be to extend page, which would create a whole corresponding template (or Layout) and you can customize the contents of the DataObject.

This will not affect your existing Page types and you can add any kind of data types to the $db array to suit your needs.

Read up here, starting with the Adding Date and Author Fields


Community Member, 211 Posts

8 October 2009 at 7:51pm


BUt that keeps the content tab always does it ?



Community Member, 283 Posts

9 October 2009 at 5:41am

Yes, but it will be a separate table that will not interfere with your existing pages.

Content is merely an DataObject $db variable named Content of type HTMLText ('Content' => 'HTMLText'). Whenever you throw a type HTMLText to the CMS it will give you the WYSIWYG editor.

If you don't want one, create a new Page type and controller that extends SiteTree instead of Page, then you can start from scratch.

If that sounds too complicated, just do the following:

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