Tutorial Wagtail Version: 2.x
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.
This is part 2 about registering Snippets and using them in a SnippetChooserPanel. If you didn't catch the first video, you can find it here.
In this video we take an existing Snippet and let the user select the Snippet from the Wagtail Admin. But we take this a step further and allow the user to select between one and four Blog Authors by using a Orderable (more on Orderables here).
The entire process goes like this:
Orderable
with a ForeignKey
to the Django ModelSnippetChooserPanel
that links to the ForeignKey
InlinePanel
that links to your Orderable
's related_name.That's just about all there is to it. The code can be kind of confusing if this is your first time, so please take a look at the Git Commit or the chunk of code below.
Registering Snippets (Blog Category) using Checkboxes
Posted on
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.
Headless CMS: Exposing Orderable Data and StreamFields
Posted on
In this tutorial you will learn how to add Orderable model fields to your Wagtail v2 API, and how to add StreamFields to your API response. As with everything in Wagtail, this is a simple task for developers.
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.
How to Add a Blog Listing Page, Blog Detail Page, and Custom Context
Posted on
In this (long) lesson we're going to cover three main topics. They all go hand-in-hand with Wagtail CMS so it makes sense to learn them all together. The three topics are: Listing Pages, Detail Pages and Adding Custom Context to your pages.
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.