PHPackages                             nswdpc/silverstripe-versioned-record-discovery - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nswdpc/silverstripe-versioned-record-discovery

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

nswdpc/silverstripe-versioned-record-discovery
==============================================

Discover unpublished records in your Silverstripe install

v0.2(3y ago)0710BSD-3-ClausePHP

Since Sep 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/nswdpc/silverstripe-versioned-record-discovery)[ Packagist](https://packagist.org/packages/nswdpc/silverstripe-versioned-record-discovery)[ RSS](/packages/nswdpc-silverstripe-versioned-record-discovery/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (5)Versions (5)Used By (0)

Versioned record discovery for Silverstripe
===========================================

[](#versioned-record-discovery-for-silverstripe)

This module provides an extension to automatically add versioned listings to configured managed models in a ModelAdmin subclass.

At present, it provides:

1. an unpublished modeladmin extension, to provide an unpublished view on configured records
2. A report showing unpublished records per model class, based on your selection

This helps to solve a common question from our content editors "What remains to be published?"

Installation
------------

[](#installation)

Install using composer:

```
composer require nswdpc/silverstripe-versioned-record-discovery

```

If you are new to creating ModelAdmins to allow easy manipulation of data in the administration area of a Silverstripe website, [the ModelAdmin documentation](https://docs.silverstripe.org/en/4/developer_guides/customising_the_admin_interface/modeladmin/) is a great starting point.

Configuration
-------------

[](#configuration)

### Report

[](#report)

The report will automatically show all versioned records in the system.

If you wish to set a different default model for the reporting view, set this in configuration (using the `Page` class as an example):

```
---
Name: 'default-target-model'
---
NSWDPC\Utilities\VersionedRecordDiscovery\UnpublishedRecordReport:
    default_target_model: 'Page'
```

### Tab extension for the ModelAdmin

[](#tab-extension-for-the-modeladmin)

This is slightly more involved, but provides an unpublished record view directly in relevant modeladmins, without needing to fiddle with filters.

#### Example

[](#example)

Here is an example of a ModelAdmin with three managed models in a Silverstripe website.

We want to add 'unpublished' record listings in the modeladmin for the first two versioned record types, so our content editors can easily find the unpublished records.

An unpublished record is one that exists on the draft stage but not on the live stage. It may have been previously published and unpublished.

Note that the configured record classes must have the Versioned extension for this to work.

### Add the unpublished\_tabs configuration

[](#add-the-unpublished_tabs-configuration)

```
