Skip to content

add script to restructure RootPage/HomePage #1622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 2, 2025
Merged

Conversation

mwvolo
Copy link
Member

@mwvolo mwvolo commented Apr 24, 2025

This is to clean up the page tree from last year's home page revamp. This script is pretty well documented, but some key things it should handle:

  • move all children pages to under the RootPage (including allowing these page types under root)
  • move RootPage to the top of the page tree
  • swap HomePage for RootPage in the site definition so routing works properly

@@ -209,7 +209,6 @@ class RootPage(Page):
# TODO: we are allowing this to be built as a child of the homepage. Not ideal.
# Once the home page is released, use something to migrate homepage children to root page and remove this parent type.
parent_page_types = ['wagtailcore.Page', 'pages.HomePage']
subpage_types = ['pages.FlexPage'] # which might also require allowing all pages to be children.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it'll still be possible to create new flexpages after this right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this is just saying that there are no restrictions on what can be a subpage of RootPage

@mwvolo mwvolo merged commit df17362 into main May 2, 2025
5 of 6 checks passed
@mwvolo mwvolo deleted the restructure-root-pages branch May 2, 2025 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants