A SilverStripe extension to mark gridfield rows for versioned objects as draft or modified

v1.1.0 2017-07-25 04:54 UTC

This package is not auto-updated.

Last update: 2022-05-20 12:25:37 UTC


This module extends GridField to add some styles and labels for showing the published state of versioned objects.


Maintainer Contacts

Nathan Cox (


  • SilverStripe 3.1+



Installation Instructions

With composer:

composer require nathancox/versionedgridrows

Usage Overview

Configuration via config.yml:

  mode: 'component'			# can be "component", "config" or "always"
  show_published: false		# set to true to show a flag on published items as well

Options for the mode setting:

mode: 'component'

Only add row styles to GridFields with the VersionGridRows component added to them. This is done like any other component:

$gridFieldConfig->addComponent(new VersionedGridRows('Title'));

The constructor argument ("Title") specifies the name of the column the "draft" or "modified" flags will be appended to. Leave blank to not automatically append the flags.

mode: 'always'

Styles will be added to all GridFields that managed versioned objects. If you want to add flags you need to do it manually with something like this:

$summary_fields = array(
	'VersionedTitle' => 'Title'


public function VersionedTitle()
	return VersionedGridRows::get_column_content($this, $this->Title);

mode: 'config'

Specify a list of classes that styles will be added to.

  mode: 'config'
  	- Page
  	- StaffMember
  	- HomepageSlide

You will have to add version status flags manually as shown above.

Known Issues

Issue Tracker