One of the key features that sets Craft CMS apart from its competitors is its flexible section types. In this article, we will dive into the world of Craft CMS's section types and how each can be best used.
Let’s goooooo!
Sections in Craft CMS define the structure of your content. You can create as many sections as you like. Sections allow you to group related content together and determine how it is displayed on your website.
For all sections, you must define the following:
Craft CMS offers three section types: Channels, Structures, and Singles. Each section type serves a specific purpose and caters to different content needs.
Channels are ideal for organising content that is displayed in a linear format. They are perfect for news articles, blog posts, or any content that follows a chronological order. Channels provide a straightforward way to manage content that is frequently updated.
Structures offer a hierarchical way of organising entries. They are great for building websites with multiple levels / nested entries, and interconnected relationships. Structures allow you to arrange your content in a tree-like structure, giving you control over the order and relationships between entries.
Singles are designed for standalone entries. Singles allow you to have unique, individual pages that can be easily managed and edited without the need for complex structures or relationships.
Might be a bit controversial, but I would never choose to use Singles. Instead, I would set up various Entry Types which you can then use within a Channel / Structure section type. This gives you much more flexibility and customisation over the entry as a whole.
When it comes to choosing the right section type for your content, it's essential to consider the nature and structure of your content. Ask yourself questions like:
Does my content follow a linear timeline or chronological order? E.g. order by post date
Does my content have complex relationships?
Do I need unique, standalone pages?
It’s always worth considering the above before you go ahead and set everything up. Craft CMS will have you covered for some scenarios though as you can change section type after it has been created. You may just incur ‘some’ data loss. But in my experience, if you are going from a Channel to a Structure, there is not much effect switching between these two.
To make the most out of Craft CMS's section types, here are some best practices for organising your content effectively:
Before diving into Craft CMS, take the time to plan out your content structure. Define the relationships between different sections / entries and consider how they will be accessed and displayed on the front end.
Take advantage of Craft CMS's categories to further organise your content within Channels. This will help users navigate and filter through your content more efficiently.
The beauty of Craft is that you can set up custom fields and then use them wherever you damn well please! So if you have set up a Thumbnail Image field for a Blog section type, the same field can also be used within Craft Commerce on Products. Magic!
As always, happy Crafting! 🔥
I've been at Shape for around 8 years now. I bagged a couple of weeks of work experience at the end of my first year at Salford Uni and from then on, well what can I say, they couldn't get enough of me.