Last active
January 2, 2019 23:54
-
-
Save PetersonDave/4948852 to your computer and use it in GitHub Desktop.
Checking Sitecore field type via FieldTypeManager.GetField()
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
var field = item.Fields[_fieldId]; | |
var type = FieldTypeManager.GetField(field); | |
if (type is LinkField) | |
{ | |
... | |
} | |
if (type is InternalLinkField) // such as drop tree controls | |
{ | |
... | |
} | |
else if(type is MultilistField) | |
{ | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment