Hi, I have added a new section to my Umbraco 8 website using the documentation https://our.umbraco.com/documentation/extending/section-trees/sections. If possible I would like for my new section to appear before the other default sections. I tried adding a "weight" value to the package.manifest which works for ordering Dashboards. Unfortunately that does not work on Sections so I was hoping somebody could let me know if there is a way for me to do this as the documentation does not cover available/possible settings.
I have managed to find out how to insert the section by registering it at startup:
[RuntimeLevel(MinLevel = RuntimeLevel.Run)]
public class StartupComposer : IUserComposer
{
public class MySection : ISection
{
public string Alias => "mySection";
public string Name => "My Section";
}
public void Compose(Composition composition) {
composition.Sections().Insert(0, typeof(MySection ));
}
}
However I now need to know how to change the tab name from [mySection] (It defaults to the alias enclosed in square brackets). Using the link from my OP I was able to specify the name in a lang/en-US.xml file to fix this. I cannot find documentation explaining how to decorate my ISection class to acieve the same result.
Ah okay, it seems I can just use a plugin for the sole purpose of adding a lang directory with the translations in the same way as the original link - but without the need for the manifest.
Ordering Custom Sections
Hi, I have added a new section to my Umbraco 8 website using the documentation https://our.umbraco.com/documentation/extending/section-trees/sections. If possible I would like for my new section to appear before the other default sections. I tried adding a "weight" value to the package.manifest which works for ordering Dashboards. Unfortunately that does not work on Sections so I was hoping somebody could let me know if there is a way for me to do this as the documentation does not cover available/possible settings.
Thanks, James
I have managed to find out how to insert the section by registering it at startup:
However I now need to know how to change the tab name from [mySection] (It defaults to the alias enclosed in square brackets). Using the link from my OP I was able to specify the name in a lang/en-US.xml file to fix this. I cannot find documentation explaining how to decorate my ISection class to acieve the same result.
Thanks, James
Ah okay, it seems I can just use a plugin for the sole purpose of adding a lang directory with the translations in the same way as the original link - but without the need for the manifest.
is working on a reply...