SS3: Content and Settings

Content and Settings

New: don't put too much effort into this yet - things are now heading into the direction of one single page edit screen, with nested tabs!

In SilverStripe version 3 there is a slight difference in the way tabs are organized in the CMS. At the moment it looks like nested tabs will no longer be supported. As for editing pages, we now have two separate menu-items or sections if you will: Content and Settings. We find the original Content and Metadata tabs in the Content section, and the Behaviour and Access tabs in the Settings section. Todo has disappeared forever!

Two separate functions
To make the distinction between both sections, there are now two seperate functions as well: getCMSFields() for the Content section and getSettingsFields() for the Settings section. Both functions are basically exactly the same. We can add new tabs to each section, the way we always did, as long as we avoid the use of nested tabs for now.

In the developers group there are some rumours that nested tabs might be supported yet again, and the Settings menu-item disapear. These are only rumours but still I'll wait a bit before upgrading all my code accordingly...


This is a bit of code from one of my test sites.

Content tabs:
Content: 'Root.Main'
Metadata: 'Root.Metadata',

Settings tabs:
Behaviour: 'Root.Settings'
Access: 'Root.Access'

function getCMSFields() {
	$fields = parent::getCMSFields();
		new CheckboxField(
			_t('Page.SHOWTWITTERSHARE', 'Show the Tweet button')
	return $fields;

function getSettingsFields() {
	$fields = parent::getSettingsFields();
		new CheckboxField(
			_t('Page.ADDTOFOOTERMENU', 'Add this page to the footer menu')
	return $fields;


Het versturen van reacties is uitgeschakeld.

RSS feed voor reacties op deze pagina