Skip to content

Instantly share code, notes, and snippets.

@icavalheiro
Created May 14, 2020 21:25
Show Gist options
  • Select an option

  • Save icavalheiro/35d42252543dfe3f7dd7fc05932a4459 to your computer and use it in GitHub Desktop.

Select an option

Save icavalheiro/35d42252543dfe3f7dd7fc05932a4459 to your computer and use it in GitHub Desktop.
Umbraco Base Composer class
using Logic.Services;
using Umbraco.Core.Composing;
using Umbraco.Web;
using Umbraco.Web.Dashboards;
using Umbraco.Web.Sections;
namespace PROJECT
{
public class Composer : IUserComposer
{
public void Compose(Composition composition)
{
//Remove the "forms" label from the sections menu
composition.Sections().Remove<FormsSection>();
//Remove the boring umbraco news section from the content dashboard
composition.Dashboards().Remove<ContentDashboard>();
//Add dependencies for injection
composition.Register(typeof(EmailService));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment