7 days of unlimited WordPress themes, plugins & graphics - for free!* Unlimited asset downloads! Start 7-Day Free Trial
FREELessons: 11Length: 46 minutes

Next lesson playing in 5 seconds

  • Overview
  • Transcript

2.3 Craft’s Content Organization

Craft’s content organization is unlike that of most other popular CMSs. It has a unique system which allows you create a custom back-end experience for clients from the ground up. In this lesson we’ll step through how all the aspects of Craft’s content organization fit together.

2.3 Craft’s Content Organization

Hey welcome back to up and running with Craft CMS in this lesson we gonna to start going through the back end of Craft how content is organized and how it all works together. So here in the back end I want you to stop by clicking on this entries in the left menu here. And by default we've got a couple of entries here, so what is an entry? Well in Craft CMS an entry is the default him for any type of content. So in other content management systems you might be familiar with set content types like posts or pages. Well, with Craft CMS, there are no set content types. Every type of content is just referred to as an entry and you can create all different kinds of entry types yourself, depending on what you need for your site. Now even though there aren't fixed content types out of the box. What Craft does have is different kinds of content that are separated by functionality and these are called sections. So when you're creating a custom ienry type you can to set it up under one of three section types depending on the kind of functionality you need. One type of section that you might like to use is a channel, a channel is designed to accommodate streams of ongoing content. Sorry, a blog for example or a section of recipes something that's gonna have ongoing updates. And because channels are designed to have ongoing content added to them, they have functionality that is specific to that purpose. So you things like post publishing dates, expiration dates, author information, being associated, and things along those lines. Now in contrast another section type that's available is a single. A single is designed for a one off piece of content for any single entry type that you create there will only be one entry. So for example a Contact Us page and you might need a Contact us page to have a Google Map, a contact form, a click to call button, and a template that's only gonna apply when you need to have a Contact Us page. So in that case you would create a contact entry type under a Singles Section Type. And in this case because a single is designed to be a one off, it doesn't have things like post dates, expiration dates, associated authors and so on. And then, as well as singles and channels, there's a third section type and that's somewhere between the two. It's called Structures, like Singles, they don't have things like post authors, post publishing dates, and what have you associated with them because they're not designed for ongoing updates over time. But like channels, you can have more than one. So an example might be using Craft CMS to set up a documentation site. You are creating a set of fixed content that's not really gonna be updated frequently, but it's not really the same thing as a blog. The entries need to be really well organized, they need to be structured, hence the name, structures. So just to recap those sections really quickly, you have singles for one-off entry types. You have channels for ongoing flow of content like with a blog, and you have structures for something in between. We need multiple entries that have to be really well structured. So now you know about how a Craft has entries. Entries can be different entry types and each one of those entry types will fall under one of three section types. The final piece of the puzzle for how Craft works in the back end is fields. So every time a user adds an entry, they're going to have to fill in a series of fields. So let's look at some examples, right here, we have this welcome to local host entry. This is a single, it's a home page. It only has to appear once so it's a single. And in here we've got two fields, we've got the title field and the body field. But if we look at this other entry here we just installed Craft. This is an entry type that falls under the channel section type, so you can see over on the left here we have a news channel. And then this entry has been inserted into that news channel section. So we'll open been this one up and take a look. And here we have different fields. We still have the title and the body field, but we also have a tags field, and the really cool thing with Craft CMS is none of these fields are set in stone. You can have any kind of fields you want for any entry type that you set up. So, for example, let's say you wanna have a blog and you wanna have a featured image associated with every single blog post. All you have to do is set up a new image relating field named featured image, and associate it with your blog post entry tilte. And you're gonna see how to do all that a little bit later. So that now covers all the core concepts of how content is organized in the back end of Craft. You've got entries, entries can be different entry types and how users will add entries for different entry types depends on the set of fields that you set up to correspond with those entry types. Each entry top will fall under a different section type. Section types correspond with different functionality, and you'll choose the most appropriate one depending on what you need your entry type to do. So now that you know all that, in the next lesson, we're going to start working through some examples between now and the end of the course. We're going to set up some section types, some entry types, some fields, and we're going to create a basic custom template. And we're gonna begin by creating a custom section, so I'll see you in the next lesson.

Back to the top