Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Hi Ethan,
This should be possible using the ContentLanguageSettingRepository
(EPiServer.DataAbstraction
).
As far as I'm aware, if content inherits language settings from it's parent then it has no ContentLangaugeSetting
. So I believe you'd want to do something like this (which I'll caveat by saying I haven't tested at all):
var languageSettings = _contentLanguageSettingRepository.Load(contentLink);
if (languageSettings == null)
{
return;
}
foreach (var languageSetting in languageSettings)
{
_contentLanguageSettingRepository.Delete(contentLink, languageSetting.LanguageBranch);
}
I have a site with a complex series of langauge fallbacks. I have set theis on the Root item. However, there are some blocks that were created before I set up the rules on Root so they have different rules. I would like to create a schedule job to loop throuh all blocks and pages and basically 'check' the inherit settings from parent. Can this be set in code?