#### This Page

# `lektor.db.``Record`

Records are Source Objects that come from the `content/` folder and correspond to Data Models. They provide a wider range of functionality compared to a standard source object but they also provide all the functionality a regular source object does.

In addition to the functionality here, they also expose all the configured fields.

## Accessing Data

Most of the time things will just work as you expect. If you access these objects from templates they give access to their built-in attributes as well as custom fields through the attribute syntax. If however a built-in attribute overlaps with your custom field, you need to access the fields with the subscript syntax (`[]`):

    <p>Built-in Path: {{ obj.path }}
    <p>Path field: {{ obj['path'] }}

#### []

Looks up a field from the type.

#### attachments

Returns a query to the attachments of a page.

#### children

Returns a query to the children of a page.

#### contents

Provides access to the raw contents of a record or attachment.

#### exif

Provides access to the EXIF information of an image.

#### format

Returns the format of a supported attachment.

#### get_siblings()

The previous and next children of this page's parent.

#### has_next()

Whether the record has a next sibling.

#### has_prev()

Whether the record has a previous sibling.

#### height

Returns the height of an image in pixels.

#### is_attachment

Indicates if the record is a page or attachment.

#### pagination

Provides access to the pagination information.

#### record_label

Returns the configured label for this record.

#### thumbnail()

Creates a thumbnail for an image.

#### width

Returns the width of an image in pixels.

## Comments