Skip to content

Instantly share code, notes, and snippets.

@5up3rman
Last active July 21, 2017 04:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 5up3rman/1219a7b839dac480edefa04073cf1c45 to your computer and use it in GitHub Desktop.
Save 5up3rman/1219a7b839dac480edefa04073cf1c45 to your computer and use it in GitHub Desktop.
Display Additional Item Information
namespace EETK.Foundation.Toolkit.Rules.Actions
{
public class DisplayAdditionalItemInformation<T> : RuleAction<T> where T : CustomSectionsRuleContext
{
public override void Apply(T ruleContext)
{
var editorSection = ruleContext.EditorSection.FirstOrDefault(x => x.DisplayAdditionalItemInformation) ?? new EditorSection();
editorSection.Title = Translate.Text("Additional Item Information");
editorSection.DisplayAdditionalItemInformation = true;
ruleContext.EditorSection.AddOrReplaceItem(editorSection);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment