Accessing Fields

Not only in razor view, every node and media provides a short way to access field values by using the .Value<>() method.

eg.:

current.Value<CheckboxField>("Redirect to first child")?.Value

Supported Field Parsers

  • TextField
  • CheckboxField
  • DateField
  • ImageField
  • RelatedMediasField
  • RelatedNodesField
  • RelatedUsersField
  • RepeatableField

 

To handle other values or the raw value, the TextField will convert anything to string.