Skip to content

Instantly share code, notes, and snippets.

@PetersonDave
Last active January 2, 2019 23:54
Show Gist options
  • Save PetersonDave/4948852 to your computer and use it in GitHub Desktop.
Save PetersonDave/4948852 to your computer and use it in GitHub Desktop.
Checking Sitecore field type via FieldTypeManager.GetField()
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