# Human readable name of this type name: <%= config[:name] %> # Lowercase, underscored handle used to access this type slug: <%= config[:slug] %> # Explanatory text displayed in the back-office description: A description of the content type for the editors # Slug of field used to identify entries by default, such as the title label_field_name: <%= config[:fields].first.name %> # Valid values: manually, created_at, updated_at, or the slug of any field order_by: manually # Valid values: asc (ascending) and desc (descending). Set to asc by default. # order_direction: asc # Specify a field slug to group entries by that field in the back-office. # group_by: # Activate public 'create' API (e.g for a contact form) # public_submission_enabled: false # Array of emails to be notified of new entries made with the public API # public_submission_accounts: ['john@example.com'] # A list describing each field fields: <% config[:fields].each_with_index do |field, index| %> - <%= field.name -%>: # The lowercase, underscored name of the field label: <%= field.label %> # Human readable name of the field type: <%= field.type %> required: <%= index == 0 ? true : field.required %> hint: Explanatory text displayed in the back office localized: <%= field.localized %><% if field.type == 'text' %> # text_formatting: html # html (uses rich text editor) or text (uses plain text editor)<% end -%><% if field.type == 'select' -%> # if localized, use # en: ['option1_en', 'option2_en'] # fr: ['option1_fr', 'option2_fr'] select_options: ['option 1', 'option 2', 'option 3']<% end -%><% if field.type == 'belongs_to'%> # Slug of the target content type (eg post if this content type is a comment) class_name: <%= field.class_name %><% end -%><% if field.type == 'has_many' -%> # Define the slug of the target content type (eg. comments) class_name: <%= field.class_name %> # Define the name of the field referring to <%= config[:name].humanize -%> in the target content type (eg. post) inverse_of: <%= field.inverse_of %> # If you want to manage the entries of the relationship directly from the source entry ui_enabled: true <% end -%><% if field.type == 'many_to_many' -%> # Define the slug of the target content type class_name: <%= field.class_name %> inverse_of: <%= field.inverse_of %> # If you want to manage the entries of the relationship directly from the source entry ui_enabled: true <% end -%> <% end -%>