Skip to Content

Wrapping Your Head Around Craft Sections and Entry Types

One of the hardest concepts for me when learning Craft was understanding Sections and Entry Types, and how they relate to each other.

The best way to explain Craft Entry Types in relation to Sections is by turning to a platform with a similar setup: Tumblr. Tumblr is a blogging service, and just like on any other blog, you can publish entries, display those entries in a listing and filter them by tags. All tumblr URLs follow the same format: mytumblrblog.tumblr.com/post/12345/my-tumblr-blog-entry.

The main difference between Tumblr and a classic blog services is that Tumblr lets you choose the type of content you want to publish for each entry. You can publish an image, a video, a quote, a link, an audio snippet, a chat transcript, or a standard text entry like a classic blog. These different entry types are all grouped together under your main tumblr blog, the only difference between the entries is the way the content is presented.

tumblr publish screen

An image entry type provides you with an upload field, a video entry type gives you a field to enter embed code, a quote entry type gives you a short text box and a field to enter the quote’s source, while a text entry type provides a basic rich-text editor for a classic-style blog entry.

This is exactly how Entry Types work in Craft. Let’s use a Blog as an example. You have a section on your site called “Blog”, but your client wants to be able to publish different types of blog entries, just like Tumblr. So you create a Section in Craft called “Blog”. All of the entries inside this Blog Section will be able to be filtered by tags, and they will all display together on the Blog listing page ordered by date. All Blog entries will also follow the same URL structure: /blog/{slug}. This is important: the URL structure will stay the same no matter what Entry Type you use. Image entry: /blog/my-image-entry, video entry: /blog/my-video-entry, and so on.

Next, you create the Entry Types within the Blog Section. Create an Image Entry Type, a Video Entry Type, Quote, Text, and so on. Each Entry Type has its own set of fields that dictate how that entry’s content is presented. As mentioned above, Images will have an Assets field to upload with, Videos will have a Plain Text field to paste embed code, Quotes will have one Plain Text field for the quote and another for the quote’s source, Text will have a Rich Text field for a classic blog entry.

With your Entry Types (Image, Video, Quote, Text, etc.) now set up within your Section (Blog), your client can publish Blog content by selecting one of the Entry Types.

This is the essence of Craft Entry Types: they provide different ways to display the same kind of content. Entries published using any of the Entry Types listed above are still Blog entries. They can be categorized and tagged the same way, and they will all display together on the blog listing page. Each entry type is a Blog entry, they simply display blog content in different ways.

It's easy to see how Craft Entry Types open the door for all sorts of use cases beyond blogging. You could create a Products section that allows for different configuration options depending on the type of product. You could have a Resources section that shows PDF, webinar, and video-type resources.

Not every Section in Craft requires more than one Entry Type. In fact, most of the time you'll likely never need to use multiple Entry Types. But when you start work on a project that does need them, you'll realize just how useful they are both for organizing content and enhancing the publishing experience for your client.

Bonus: ExpressionEngine devs, for an add-on that simulates Entry Type behavior, check out Rob Sanchez's accurately named Entry Type.

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×