Umbraco.Community.BackOfficeOrganiser 0.1.7

There is a newer version of this package available.
See the version list below for details.
dotnet add package Umbraco.Community.BackOfficeOrganiser --version 0.1.7
NuGet\Install-Package Umbraco.Community.BackOfficeOrganiser -Version 0.1.7
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Umbraco.Community.BackOfficeOrganiser" Version="0.1.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Umbraco.Community.BackOfficeOrganiser --version 0.1.7
#r "nuget: Umbraco.Community.BackOfficeOrganiser, 0.1.7"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Umbraco.Community.BackOfficeOrganiser as a Cake Addin
#addin nuget:?package=Umbraco.Community.BackOfficeOrganiser&version=0.1.7

// Install Umbraco.Community.BackOfficeOrganiser as a Cake Tool
#tool nuget:?package=Umbraco.Community.BackOfficeOrganiser&version=0.1.7

Umbraco.Community.BackOfficeOrganiser

Umbraco Version NuGet GitHub license Downloads

Is your Backoffice a bit untidy?

  • Single-click (and opinionated) organiser for
    • Document Types
    • Media Types
    • Member Types
    • Data Types

A screenshot of the Back Office Organiser in action

Quick Start

  • Go to the backoffice
  • Click Settings
  • Click Organise
  • Select the types you wish to organise
  • Click submit and confirm
  • Refresh your page and enjoy a cleaner backoffice ✨

Configuration

Add the following to your appsettings.json file

	"BackOfficeOrganiser": {
		"DataTypes": {
			"InternalFolderName": "Internal",
			"ThirdPartyFolderName": "Third Party",
			"CustomFolderName": "Custom"
		}
	}

Extending

You can implement your own Organise Action, a method that determines where a type should be moved to. Implement the following interfaces:

  • Document TypesIContentTypeOrganiseAction
  • Media TypesIMediaTypeOrganiseAction
  • Member TypesIMemberTypeOrganiseAction
  • Data TypesIDataTypeOrganiseAction

Example

using jcdcdev.Umbraco.Core.Extensions;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;

namespace Umbraco.Community.BackOfficeOrganiser.Organisers.ContentTypes;

public class ExampleContentTypeOrganiseAction : IContentTypeOrganiseAction
{
    // Handle all but container types (Folders)
    public bool CanMove(IContentType contentType, IContentTypeService contentTypeService) => !contentType.IsContainer;

    public void Move(IContentType contentType, IContentTypeService contentTypeService)
    {
        var folderId = -1;
        var folderName = string.Empty;
        var isComposition = contentTypeService.GetComposedOf(contentType.Id).Any();

        if (contentType.AllowedTemplates?.Any() ?? false)
        {
            folderName = "Pages";
        }
        else if (isComposition)
        {
            folderName = "Compositions";
        }
        else if (contentType.IsElement)
        {
            folderName = "Element Types";
        }

        if (!folderName.IsNullOrWhiteSpace())
        {
            folderId = contentTypeService.GetOrCreateFolder(folderName).Id;
        }

        contentTypeService.Move(contentType, folderId);
    }
}

public class Composer : IComposer
{
    public void Compose(IUmbracoBuilder builder)
    {
        // Make sure you register your action BEFORE the default!
        builder.ContentTypeOrganiseActions().Insert<ExampleContentTypeOrganiseAction>();
    }
}

Contributing

Contributions to this package are most welcome! Please read the Contributing Guidelines.

Acknowledgments (thanks!)

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
14.0.3-alpha0003 50 6/24/2024
14.0.2 65 6/13/2024
14.0.1 74 6/6/2024
14.0.1-alpha0012 73 6/6/2024
14.0.0 72 6/3/2024
14.0.0-alpha0004 59 6/6/2024
14.0.0-alpha0003 55 6/3/2024
14.0.0-alpha0001 68 5/25/2024
13.0.0 136 5/25/2024
13.0.0-alpha0001 62 5/25/2024
12.0.0 68 5/25/2024
12.0.0-alpha0001 64 5/25/2024
10.0.0 70 5/25/2024
10.0.0-alpha0001 65 5/25/2024
0.1.7 528 3/17/2024
0.1.6 1,272 1/4/2024
0.1.5 361 11/10/2023
0.1.4 90 11/9/2023
0.1.3 148 11/9/2023
0.1.2 90 11/9/2023
0.1.1 81 11/8/2023
0.1.0 92 11/8/2023