Authoring Content
Our blog is starting to take shape! Let’s pause for a moment and look at the editing tools we’ve set up, from the perspective of a content author.
# Add a Blog Post
If you haven’t already, navigate to Entries and click + New entry to create your first post. Here’s what it’ll look like with a bit of content added:
# Explore Editing Features
Working with content in Craft is usually pretty intuitive—after all, you just designed the authoring experience! Here are a few things to look out for, as you get started:
# Auto-saving
From the moment you arrive on an edit screen, Craft begins autosaving your changes as a provisional draft. You always get to decide when those changes are applied, though.
Edits on an already-published entry automatically start a new draft, and you can always see the save status and even leave notes in the versions menu. This menu will also let you see previous drafts and versions, which can be handy:
If you would like to turn your edits into a draft so other users can review them, click Create draft instead of Save.
# Assets
Assets can be attached or uploaded in a variety of ways:
- From an entry page, click the + Add an Asset button, then Upload Files in the modal;
- Drag a file from a folder on your computer into the browser and drop it on the field;
- Visit the Assets screen of the control panel and click Upload Files;
This last method is a great way to seed your project with an asset library.
# Categories
Our Topics field is backed by categories, which are managed similarly to assets—this is because they are both types of elements.
Categories are attached by clicking + Add a category, then selecting an existing category or clicking Add a Topics category.
# Slideouts
Double-click any attached element (like the asset
in our Featured Image field, or the category in our Topics field) to edit it in a slideout. Here, we’ve taken the opportunity to clean up the uploaded image’s Title :Click the sidebar button
to view and edit additional details (like the asset’s filename), or click Save to save your changes and close the slideout.Edits made in this way affect the element anywhere else it’s used. For example: if you also attached the asset to a block in the Post Content field with the intention of outputting its title as a caption or credit in both places it’s used, updating its title in either place (or via the top-level Assets section of the control panel) affects all instances.
# Matrix
You can grab the handle
# Publishing
For new entries, Craft will generate slugs based on the entry’s title. Our Blog section’s URI Format (blog/{slug}
) incorporates that slug, meaning it will appear as part of the entry’s public URL. If you wish to edit the slug manually, it appears at the top of the sidebar.
You can set an entry’s Post Date to be in the future to prevent it from being available on the front-end, and optionally add an Expiry Date to have it disappear, later. You can always turn off the Enabled switch to be certain the post will be hidden publicly, regardless of other settings.
# Previewing
Choosing View from the header opens the entry in a new tab—even if it isn’t enabled. In this case, Craft generates get a private, temporary (but sharable) URL.
If you were to click this button right now, you’d get something that looks like this:
This looks scarier than it is. In fact, it tells us exactly what the problem is: we haven’t created the template that our blog posts are expecting. Let’s fix this.