Don't miss out Virtual Happy Hour this Friday (April 26).
Try our conversational search powered by Generative AI!
AI OnAI Off
Don't miss out Virtual Happy Hour this Friday (April 26).
Try this:
var service = ServiceLocator.Current.GetInstance<IAvailableContentTypes>();
AvailableSetting settings = service.GetSetting(/*ContentType name*/Name);
Or:
var repository = ServiceLocator.Current.GetInstance<IContentTypeRepository>();
var allSettings = repository.ListSettings();
Hope that help!
// Ha Bui
Hi
From 7.5 I am not able to get a setting this way. PageTypeAvailability is still there, but AvailableSetting is not. Anybody knows other way to get it or where is it moved?
var setting = new EPiServer.DataAbstraction.PageTypeAvailability.AvailableSetting();
Thanx