Within this tutorial, you will learn how to create an admin panel within the Umbraco v8 back-end. There are two main ways to create admin panels within Umbraco, angular and C#. This guide will cover the C# route. One really nice improvement within Umbraco 8 are its components. A component allows you to compose in functionally without having to manually register anything within the global.ascx. Registering a new dashboard follows a similar path. During the application start-up, you will need to register the panel with Umbraco. After it has been registered it will be displayed whenever a content editor logs-in with the correct permissions to view it.

IDashboard

To register a new dashboard within Umbraco you will need to create a class that implements from Umbraco.Core.Dashboards.IDashboard

As we are creating a panel that is only visible within the backend you will need to restrict access to the panel. This is done within 'AccessRules'. The 'Alias' as the name suggests is the name that will be displayed within the backend. The 'view' defines the location of the controller that will process the request. All Umbraco related plug-ins will be accessed using:

The '/Admin/ContentApproval' segments will map to a controller and an action you will need to create. To create the corresponding controller, you need to inherit from UmbracoAuthorizedController. Inheriting from UmbracoAuthorizedController will mean only people who are logged into the back-end will be able to view the page.

The dashboard controller does not do anything special. It will execute any custom code you add and load the corresponding view. The process is the same as any other route-hijacking you do within Umbraco. In this example, Umbraco will try to find a view within the view folder, within a sub-folder called added, within a view called 'panel.cshtml'. Depending on how you have your customer routing set-up you will likely need to register the route within the route handler.

If everything has been set-up correctly when you look within the backend you should see something similar to this:

Custom Umbraco Dashboard

Enjoy!