Craft CMS Entry Types and Sections Setup

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1 servicesAll 2065 services
Craft CMS Entry Types and Sections Setup
Simple
from 1 business day to 3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

Configuration of Entry Types and Sections in Craft CMS

Sections and Entry Types are the foundation of content structure in Craft CMS. Incorrect architecture at this level leads to rework in a month. Understanding the difference between Section types reduces design time.

Section Types

Channel — collection of entries without hierarchy. Blog, news, products, vacancies. URL is built like /blog/{slug}.

Structure — hierarchical pages with nesting and manual sorting capability. Documentation, catalog with subcategories. URL: /services/web-development/landing-pages.

Single — one unique entry. Homepage, About, Contact. No slug, no archive.

Entry Types

Each Section can have multiple Entry Types with different field sets. Example for Section Blog:

Section: blog (Channel)
├── Entry Type: article
│   └── Fields: body (Matrix), readingTime (calculated), podcast (false)
├── Entry Type: podcast
│   └── Fields: audioFile (Asset), transcript (Redactor), duration (Number)
└── Entry Type: video
    └── Fields: videoUrl (URL), thumbnail (Asset), youtubeId (computed)

Render differently by type in Twig:

{% switch entry.type.handle %}
  {% case 'article' %}
    {% include '_blog/_article' %}
  {% case 'podcast' %}
    {% include '_blog/_podcast' %}
  {% case 'video' %}
    {% include '_blog/_video' %}
{% endswitch %}

Configuration via Project Config (YAML)

# config/project/sections/blog.yaml
name: Blog
handle: blog
type: channel
enableVersioning: true
defaultPlacement: end
propagationMethod: all
siteSettings:
  default:
    hasUrls: true
    uriFormat: 'blog/{slug}'
    template: blog/_entry
    enabledByDefault: true
entryTypes:
  article:
    name: Article
    handle: article
    hasTitleField: true
    titleTranslationMethod: site
    fieldLayout:
      - type: craft\fieldlayoutelements\TitleField
      - type: craft\fieldlayoutelements\CustomField
        fieldUid: [uid-of-body-field]
      - type: craft\fieldlayoutelements\CustomField
        fieldUid: [uid-of-categories-field]

Structure with Nesting

Section: services (Structure)
├── maxLevels: 3
├── enableVersioning: true
└── defaultSort: structure (manual tree sorting)

Query child elements:

{# Get all descendants of current page #}
{% set children = craft.entries()
  .section('services')
  .descendantOf(entry)
  .level(entry.level + 1)
  .orderBy('lft asc')
  .all() %}

Fields with translationMethod Option

With multi-site support, it's important to set translation correctly:

  • none — one value for all sites
  • site — own value for each site
  • language — own value for each language
  • siteGroup — own value for site group

Configuration of 5–8 sections with Entry Types takes 1–2 days.