Contentful SDK v0.3.2 Contentful.ContentType View Source
Describes functions around ContentTypes in a Contentful.Space
See the official docs for more information.
Link to this section Summary
Functions
returns the display field for a given content type
Link to this section Types
Specs
t() :: %Contentful.ContentType{ description: String.t(), display_field: String.t(), fields: [Contentful.ContentType.Field.t()], id: String.t(), name: String.t(), sys: Contentful.SysData.t() }
A ContentType is part of the content model defined in a space
Link to this section Functions
Specs
display_field(t()) :: Contentful.ContentType.Field.t()
returns the display field for a given content type
Examples
content_type = %ContentType{display_field: "name", fields: [%ContentType.Field{name: "name"}]}
# extracts the display field from the content type
%ContentType.Field{name: "name"} = content_type |> ContentType.display_field