Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • AxopoulosDennis 2 posts 22 karma points
    Apr 10, 2023 @ 15:49
    AxopoulosDennis
    0

    Umbraco 11 ORDER CUSTOM SECTIONS

    Hi, I followed the guide on the link below and register two new sections successfully but I couldn't find a way to use the builder properly in order to order my sections before ex. settings. The guide doesn't specify If I have to create a new class or inject the builder and where should I do it.

    https://docs.umbraco.com/umbraco-cms/extending/section-trees/sections/

    So my question is how can I order my custom sections before the others umbraco sections. Moreove on UMBRACO 11 there is no class SectionsCollectionBuilder, but rather SectionCollectionBuilder.

  • AxopoulosDennis 2 posts 22 karma points
    Apr 11, 2023 @ 07:36
    AxopoulosDennis
    0

    Yeah, found it out myself.. In my opinion the documentation is not complete.

    So in case anyone else comes across this. If you want to order the sections you must not register sections on startup cause then composer won't work.

    So I commented AddSection<> on startup an then

        public class SectionsComposer : IComposer
    {
        public void Compose(IUmbracoBuilder builder)
        {
            builder.Sections().InsertAfter<ContentSection, OrdersSection>();
            builder.Sections().InsertAfter<OrdersSection, ProductsSection>();
    
        }
    }
    
  • Peter Alcock 113 posts 176 karma points
    May 18, 2023 @ 09:51
    Peter Alcock
    0

    i agree! i am also at this stage and i have my tree built but i cant fnid any documentation to show me how to render a view in the content window! any ideas?

Please Sign in or register to post replies

Write your reply to:

Draft