Tutorial Wagtail Version: 2.x
In this tutorial we'll be learning how to register another Wagtail Snippet, but instead of using an Orderable and a SnippetChooserPanel (like the previous lesson) we're going to use a ParentalManyToManyField and a form widget to create Checkboxes in the Wagtail Admin.
Sometimes you want to be able to see every option available from a snippet. A good example is when you select Blog Categories. If you had to select one at a time through a SnippetChooserPanel then you're making the end user click too much, and you're also making it harder for them to see every Blog Category in one glance.
In this tutorial we'll create checkboxes. The end result looks like this:
Below is a quick cut of the code from this lesson for those who like to copy and paste. For a full view of all the changes you'll want to look at the full Git Commit.
Registering Snippets using Django Models
Posted on
Snippets are Wagtails way of re-using existing data. For example, being able to select a Blog Author (or multiple authors) instead of having to add a name, image and website for every blog author in every blog post you make; instead you can simply fill out a form once, and re-use the final data with a couple of clicks.
Using a SnippetChooserPanel to Select Multiple Blog Authors (Snippets + Orderables)
Posted on
This is part 2, coming from the previous article/video. In this lesson we'll be using a SnippetChooserPanel to select Blog Authors (a snippet we registered last episode). We'll also add in an Orderable to our Blog Detail Page so we can select between 1 and 4 Blog Authors.
Routable Pages
Posted on
Routable Pages allow us to create "subpages" under any regular Wagtail Page. Essentially, we can create pages with urls that aren't accessible through the Wagtail CMS admin. We'll learn how to implement routable pages, how to add additional context to the new page, how to render a new page template, how to reverse the routable page url in the template and how to reverse the routable page url in the Wagtail model.
Routable Page Categories And Years
Posted on
Let's take a look at how we can filter blog posts by their URL. Previously we made a Blog Listing Page with the URL of /blog/. In this tutorial we'll add /blog/category/{category_name}/ and filter pages based on the slug in the URL.
This course covers everything from basic installation to advanced features like custom blocks and API integration, it's perfect for developers looking to enhance their skills with this powerful CMS.