Last active
December 19, 2020 16:26
-
-
Save sotirisf/b6d4e83f5216144787f41221145f4aba to your computer and use it in GitHub Desktop.
Hide unpublished variants 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Configuration; | |
using System.Web.Http; | |
namespace Site.Core.ApiControllers | |
{ | |
public class TreeVariantSettingsController : Umbraco.Web.WebApi.UmbracoApiController | |
{ | |
[HttpGet] | |
public string HideUnpublishedVariantsFromTree() | |
{ | |
var retVal = ConfigurationManager.AppSettings.Get("HideUnpublishedVariantsFromTree") ?? "false"; | |
return (retVal.ToLower()); ; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment