Learn Wagtail Course

Routable Pages

Routable Pages allow us to create "subpages" under any regular Wagtail Page. What that means is: we can create pages with urls that aren't accessible through the Wagtail CMS admin.

This is particularly useful when integrating into larger applications or adding detail pages without needing to enter the content into a new Wagtail Page. Routable Pages are great in instances like these:

  • Blog Category Listing Page (ie. /blog/your-category/; auto-generated url)
  • Subscribe Pages (ie. success pages)
  • Checkouts/Carts/Buy Pages (ie. e-commerce integration with Django Models)

In this video we're going to explore how to create a Routable Page on our Home Page, and also another Routable Page on the Blog Listing Page. We'll also learn how to reverse the routable page urls through the template and how to reverse routable page urls using Python in our Wagtail model.

The Git Commit

If you're interested in the entire GitHub commit, you can find it here: https://github.com/CodingForEverybody/learn-wagtail/commit/d215c36a8aa5094d53e5b83e7b0cc4a3d05e04d5

Was this helpful to you?

Sharing is caring. Help the community by sharing this article.