#### This Page

# `add_type` (`type`)

- Method of Environment
- New in Lektor Version 2.0

This registers a new Field Type with the environment

## Example

    from lektor.types import Type

    class MyThingType(Type):
        widget = 'singleline-text'

        def value_from_raw(self, raw):
            return raw.value

    def setup_env(self, **extra):
        self.env.add_type(MyThingType)

## Comments