Umbraco Custom Section

This repository is a combination of various other sites and forum posts about creating a custom Umbraco section. The aim is to have working example code accompanied by some extra documentation about a custom section. This custom section will contain the following features:

It has been developed for and tested on Umbraco 7.7 - 7.10.

1. How to install

The root of this repository is the App_Plugins folder of a default install of Umbraco. So to start, do the following:

  1. Create empty ASP.NET (.NET Framework) project.
  2. Add UmbracoCms nuget package.
  3. Clone this repository into the App_Plugins folder. Let ModelsBuilder be. Include all the files from this repository into your Umbraco-csproj.
  4. Add the following nuget packages:
    • ExpressMapper
    • Microsoft.EntityFrameworkCore
    • Microsoft.EntityFrameworkCore.InMemory
    • Microsoft.EntityFrameworkCore.Relational
    • Autofac
    • Autofac.Mvc5
    • Autofac.WebApi2
    • TwoFactorAuthNet
    • Microsoft.Owin.Security.WsFederation (3.1.0)
  5. Build.
  6. Add the project as a new website in IIS.
  7. Run the installer and setup Umbraco.
  8. Update web.config for these features:

2. Use of example code

Although it is perfectly fine to use every bit of example code shown in this repository, please keep in mind that most examples are for demonstrating how to use a feature of Umbraco, and do not really showcase good application design. They are simple too basic and simplistic for that.

3. Table of contents

  1. Basics
  2. Custom Tree
  3. Search
  4. Dependency Injection
  5. Custom pages
  6. Multiple sections
  7. Basic two factor authentication
  8. Azure AD / ADFS

4. Sources used

Umbraco icons

Custom section

2FA login flow

ADFS

5. Contributing

If you see something incorrect, please submit a pull request and I will have it fixed.


Last update: 2018-04-02