Copied to clipboard

Flag this post as spam?

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


  • Carlos Casalicchio 117 posts 479 karma points
    Feb 25, 2021 @ 15:04
    Carlos Casalicchio
    0

    Override Section Name

    Is it possible to override the section name in Umbraco 8?

    What I want to do is rename the "Users" section (tab) to "Umbraco Users" because I am implementing a new section that will also be managing external users (Auth0).

    In other words, I want to have the old Users tab be named "Umbraco Users" while the new tab will be called "Clients".

    I've tried creating a new Section with the same alias of Users, but it breaks.

    namespace MyCustom.Sections
    {
        using Umbraco.Core.Composing;
        using Umbraco.Core.Models.Sections;
        using Umbraco.Web;
    
    public class SectionComposer : IUserComposer
    {
        /// <summary>Compose.</summary>
        public void Compose(Composition composition)
        {
            composition.Sections().Append<UserSection>();
        }
    }
    public class UserSection : ISection
    {
        /// <inheritdoc />
        public string Alias => "Users";
    
        /// <inheritdoc />
        public string Name => "Users";
    }
    }
    
  • Dave Woestenborghs 3325 posts 11170 karma points MVP 5x admin c-trib
    Feb 25, 2021 @ 15:23
    Dave Woestenborghs
    1

    Hi Carlos,

    I think the easiest way is to do it by changing the label in the translation files.

    https://our.umbraco.com/Documentation/Extending/Section-Trees/sections#adding-a-language-translation-get-rid-of-the-square-brackets

  • Carlos Casalicchio 117 posts 479 karma points
    Feb 25, 2021 @ 15:29
    Carlos Casalicchio
    0

    Yeah that does the trick. Thank you!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies