Created
October 7, 2016 12:17
-
-
Save tompipe/87e03be7572712872e6fcb0abb6e396c to your computer and use it in GitHub Desktop.
Nested Content Property Editor Grouping
This file contains hidden or 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
public class NestedContentEditorGroupHandler : ApplicationEventHandler | |
{ | |
protected override void OnApplicationStarted(object sender, EventArgs e) | |
{ | |
base.OnApplicationStarted(sender, e); | |
var dtMap = Mapper.FindTypeMapFor<IDataTypeDefinition, DataTypeBasic>(); | |
dtMap?.AddAfterMapAction((s, d) => | |
{ | |
var src = (IDataTypeDefinition) s; | |
var dst = (DataTypeBasic) d; | |
if (src.PropertyEditorAlias == "Our.Umbraco.NestedContent") | |
{ | |
dst.Group = "Nested Content"; | |
} | |
}); | |
} | |
} |
Author
tompipe
commented
Oct 7, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment