Entries

Updated on Jan 23, 2025

The next tab in the CraftCMS dashboard is Entries. An Entry in the context of Craft is a flexible container that does not have a specific function on its own. They are blank slates with which you can create content. It can be anything from blog posts, pages, articles, or any other content you can think of. Despite mainly being an empty container, they support a few key features: Author, Post Date, and Expiration Date. You can assign additional key features depending on the entry type or the Section used.

In This Post:

Section

Sections

Entries are organized in Sections. A Section in the context of Craft defines the type of content contained within it and how it behaves. The three Section types below will make this definition clearer.

  • Single Sections - These Sections typically exist as a single instance. The homepage, about page, or contact page are all examples of Single Sections. There is only one of that page type in the web application;
  • Channel Sections - You can think of Channel Sections as a chronological list of entries. For example, you would use a Channel Section to create your blog post entries instead of creating multiple Single Sections;
  • Structure Sections - These Sections are similar to the above but follow a hierarchical organization. In other words, the Entries within them have a parent-child relationship, like how it would be in documentation.

Additionally, each Section has the following options you can define:

  • Entry URL - You can determine if entries in the Section have a URL;
  • URL Composition - Additionally, you can define what the URL for the entries will look like;
  • Template - You can decide which template is loaded when an entry’s URL is requested;
  • Entry Types - You can also define what entry types are available for the Section;
  • Authors - You can decide how many authors can be associated with any entry within the Section;
  • Multiple Sites - Finally, if your project has multiple websites, your Sections can also set which site new entries are created in by default and which website entries in the current section will target.
Section

Entry Types

The way Craft differentiates between individual Fields and layouts within a Section is via Entry Types. You can think of an Entry Type as a template. For example, you can have a separate Entry Type for standard blog posts, video posts, and gallery posts in your Blog Section. This is particularly useful when you need one Section with different content.

Each Entry Type can have its own custom fields, but there are several that every Entry Type has by default.

  • Name - Self-explanatory, the Name for the Entry Type;
  • Handle - Uniquely identifies this Entry between templates or queries. Usually the same as the Name;
  • Icon and Color - These fields allow you to code each Entry Type for easier distinction visually;
  • Show Title Field - This switch allows you to show or hide the title field. That way, a title can be set either by the author or automatically generated;
  • Show Slug Field - Same as the above, but for the slug field instead;
  • Show Status Field - Like the other two, but instead, it relates to the status of the Entry;
  • Field Layout - Here you can arrange the various Fields of your Entry. This is not how they will appear on the finished page but how they will appear in the dashboard.

In addition to the default fields, an Entry can also support custom ones. You can create those using the +New Field button when editing an Entry

This will open a new window on the right of your screen, and you can create your custom field within it. You can choose from many different options and tailor the field to precisely what you need.

Next, let us take a look at creating an Entry.

Section

Creating Entries

Creating Entries is very easy! However, before making any Entries, we must complete two steps: create an Entry Type and a Section. Fortunately, it is straightforward to create those, too, since Craft provides you with everything you need right into the dashboard.

Firstly, go to Settings > Entry Types and click New Entry Type.

Then, fill in the required fields. They are very straightforward, but we will explain what each one of them is for your convenience.

  • Name - Write the name of your Entry Type here. It should be something simple but precise;
  • Handle - This will be how you reference this Entry Type in your themes. This field will automatically populate when you enter the Name, but you can change it if you wish;
  • Icon - Select an appropriate icon from the list that will represent this Entry Type;
  • Color - You can even choose a color to associate with this Entry Type for better recognition;
  • “Show” Toggles - These three toggles are rather self-explanatory, as they will either enable or disable their respective fields: Title, Slug, and Status;
  • Field Layout - Here, you can tinker with the order and arrangement of your fields. This arrangement will only appear in the dashboard and not the finished page. That is accomplished via the code in your template. You can also create entirely new fields, too.

When you are satisfied with your Entry Type, click Save.

Now that you have an Entry Type, it is time also to create a new Section. Go back to Settings and click on Sections.

Then, click on New Section, and input all the required fields.

Let’s break down this screen and the options you will find in it.

  • Name - The name of your Section. Make sure it is something descriptive and concise so you can recognize the Section at a glance;
  • Handle - As the tooltip explains, how you will refer to this Section in your templates. You can use the name from above for maximum clarity;
  • Enable Versioning - Toggle versioning on or off. If you enable it, Craft will automatically save a new version of this Section each time it is updated. It is useful if you want to have a history of changes;
  • Section Type - Choose the type of this Section: Single, Channel, or Structure. We already mentioned what each of them is in this part of the tutorial;
  • Entry Types - Select or create the Entry Type you want to use with this Section;
  • Site Settings - This section specifies which website the Section can be used in, as well as the style of Entry URI it will have, the template to be loaded when the URL is requested, and if this Section should even be enabled on the site. Here is what each column of this table means:
  • Site - Name of the websites currently present under this installation of Craft;
  • Entry URI Format - The format of the Entry URI for this particular section. Here, you can specify the structure the URI/URL will take, and it is auto-filled to be the name of the section followed by the entry slug;
  • Template - In case you have a template you want to use when an Entry from this Section’s URL is requested, you can specify it here;
  • Default Status - Toggle whether this site has this Section available to it;
  • Preview Targets - Here you can define the URLs where this Section’s Entries will be visible. You can include additional URLs for internal or private use, for example, in this section. The Auto-refresh option determines if the previews should automatically refresh when authors update their content;
  • Max Authors - Finally, you can input the maximum number of authors the Entries of this Section can have.

When ready, click on Save.

Finally, we can create an Entry! Click on Entries from the menu on the left and then on New Entry. You will be prompted to select one if you have more than one Section. Here is where you can see the culmination of the Section and Entry Type we made earlier.

Fill in your fields and save your changes. That will take you back to the list of Entries. You can edit an Entry by ticking it first and then clicking on the cogwheel that appears. That will open a drop-down menu with many options.

Unless you have a template and have selected it in the Sections part, you won’t be able to preview the blog post right now. We will touch upon that when we build an example blog together. But, with that, the process of creating Entries is completed. It is time we moved on to the next section of the dashboard: Categories.

On this page...