VersionedGridFieldDetailForm, for managing Sitetree (or any other versioned objects) in CMS interfaces, such as ModelAdmin
Switch branches/tags
Nothing to show
Pull request Compare This branch is 59 commits behind icecaster:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


(well, its more a detailform, but who searches for silverstripe versioned gridfield detail form)


  • SilverStripe 3.0 or newer


This module provides a gridfield detail form, with the asscoiated actions required for managing versioned objects, eg SiteTree descendants.

This comes in handy especially when using a modeladmin to manage parts of the sitetree.

Add this to your modeladmin to get the magic going:

function getEditForm($id = null, $fields = null) {
	$form = parent::getEditForm();

	$fieldList = $form->Fields();

	foreach($fieldList as $field) {
		if($field instanceof GridField) {
			$class = $field->getList()->dataClass();
			if(Object::has_extension($class, "Versioned")) {
				$config = $field->getConfig();
					->addComponents(new VersionedGridFieldDetailForm());
	return $form;


This code is not particulary nice and has been put together from many areas of the cms and framework. I'm sure there are more elegant ways of doing this. Keep the pull requests coming!