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 170 posts 709 karma points
    Feb 25, 2021 @ 15:04
    Carlos Casalicchio
    0

    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 3504 posts 12133 karma points MVP 8x 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 170 posts 709 karma points
    Feb 25, 2021 @ 15:29
    Carlos Casalicchio
    0

    Yeah that does the trick. Thank you!

Please Sign in or register to post replies

Write your reply to:

Draft