Allow models to be revisioned, ordered, and editied through the admin without appearing in the explorer
See original GitHub issueI don’t think it makes sense to think about all manageable models in terms of pages.
Wagtailmodeladmin gets us most of the way there. But what we don’t have, is the ability to create “things” in Wagtail that are also version controlled and rearrangeable. The workaround is to just let “things” be pages. But then you _have_ to find a place for them in the Explorer. I don’t want that, though. I want them to be separate.
The problem is that pages are not what a website is comprised of, they’re how the website is delivered. This can change with technology – an API for instance won’t deliver content in terms of pages. It can also be confusing for content editors:
If a content editor wants to add a new team member, they shouldn’t have to go under “about > team”. They can click “team” in the left sidebar and add one right there. It could even have a cute “person” icon. How much more straightforward could it be?
I would rather not use "PersonPage"s for the sites I build. It’s just a Person.
Okay, so how about displaying the content? Ideally, with blocks. Every aspect of the page body is built by blocks. Want a listing of people? Add a “Team Block” to your body StreamField. The team block is just a placeholder block in the admin, maybe with some options. Then on the frontend it displays the team listing. This way you can create a StandardPage called “Team” and add a team block to it. Or for more granular control, have different StreamFields for different page types.
Need team members to have their own URLs? You could hard-code the section URL in Django, like: /person/$SLUG
, where the slug is dynamic. This is fine for “things.” Cool URLs don’t change, anyway.
What do you think? I think this could simplify things a lot. All we need to make this happen now is a base class to inherit from, similar to Page, but that doesn’t appear in the Explorer. The admin side can be handled by Wagtailmodeladmin.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:5
- Comments:34 (25 by maintainers)
Top GitHub Comments
Allowing non-page models to be versioned is still an open issue (but not one that we’re likely to get to in the short term).
One way we could do this is to allow for multiple explorers.
This would create a new explorer menu for “grants.”
In the database, a Grant would have a field storing the tree path (just as normal pages do). It would also have an
explorer_id
field which identifies which explorer the path is relative to.This might not be the best design, just brainstorming.