Created
May 14, 2020 21:25
-
-
Save icavalheiro/35d42252543dfe3f7dd7fc05932a4459 to your computer and use it in GitHub Desktop.
Umbraco Base Composer class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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