Copied to clipboard

Flag this post as spam?

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


  • Yasharth Tahiliani 8 posts 78 karma points
    Mar 08, 2021 @ 14:25
    Yasharth Tahiliani
    0

    How can I get Config Values in Umbraco v8?

    How can I get Config Values in Umbraco v8. I am Migrating an Umbraco v7 project and have the following code.

                if (UmbracoConfig.For.UmbracoSettings().RequestHandler.AddTrailingSlash)
                {
                    baseRoot = baseRoot.EnsureEndsWith("/");
                }
    

    How can I achieve the same in Umbraco v8, as I am unable to find the UmbracoConfig class?

  • Alex Skrypnyk 6182 posts 24284 karma points MVP 8x admin c-trib
    Mar 08, 2021 @ 16:30
    Alex Skrypnyk
    1

    Hi

    Use "GlobalSettings" class

    More info here - https://our.umbraco.com/apidocs/v8/csharp/api/Umbraco.Core.Configuration.GlobalSettings.html

    Thanks, Alex

  • 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