25_wagtail_menu.png
View Post
Learn Wagtail Course

How to Create a Custom Wagtail Menu System

Almost every website has some form of navigation. Wagtail websites are no different. But creating a menu isn't as easy as making top level pages (although that's an option!). In this tutorial we're going to explore how to create a Menu System using a Clusterable Model, an Oderable, a Snippet, and a custom template tag.. from scratch!

24_django_wagtail_page_pagination.png
View Post
Learn Wagtail Course

How to Paginate Your Wagtail Pages

Pagination is the ability to click through "pages". You most commonly see this on a Blog Listing Page, where you have "page 1 of 4" for example. In this lesson we're going to use Django Paginator right out of the box to add pagination to our Wagtail Blog Listing Page. No 3rd party packages, no craziness, and minimal maintenance. Just beautiful Wagtail and Django working together in 11 lines of code i...

23_wagtail_cms_child_parent_specific_pages.png
View Post
Learn Wagtail Course

How to only get Parent and Child Class Pages and their Specific Fields

When querying for a Wagtail Page that has child (Subclassed) pages, you'll receive all of the pages in your QuerySet. There are times when you simply want the child pages (all types), a specific type of child page, or just the parent page itself with no children. In this lesson we'll explore Wagtails .not_exact_type() and .exact_type() methods.

22_wagtail_page_specific_child_pages.png
View Post
Learn Wagtail Course

Getting Child Page Properties From a Subclassed Page

In Wagtail, and just like in Django, you can subclass classes. In this lesson, we're subclassing a Wagtail Page into 2 child pages. But when we query for all the parent classes, we're also given the child classes in the QuerySet, and the data is somewhat inconsistent because child classes can have unique fields that differ from their parents and siblings.

21_subclassing_django_wagtail_pages.png
View Post
Learn Wagtail Course

How to Subclass Wagtail Pages

Subclassing is having a class (in this case it's a Wagtail Page) that can be used for other classes (Wagtail Page's). The parent class has all the common attributes for the child pages, and every child page will inherit everything from it's parent. In this lesson we'll explore that by creating a subclassed Article and Video Blog Page that share a common parent, and then we'll extend the functionality of ...