Consider "redirects as pages" notes from Ethan Jucovy #11383
Replies: 3 comments
-
FWIW, I've implemented something based on Ethan's notes on a project and that proved very helpful. One of our use cases: needed to add a link in the menu to a specific anchor tag (a UI tab) D |
Beta Was this translation helpful? Give feedback.
-
I've created a gist borrowing Ethan's code and using |
Beta Was this translation helpful? Give feedback.
-
Some assorted thoughts on this, as the subject of redirects has come up a couple of times today... In many ways, the redirect-as-page approach is more elegant than wagtailredirects: they're more visible in the admin, have fewer moving parts (no need for middleware or a separate admin module) and can be used in situations where the source URL isn't a 404 (see #2533). However, there are a couple of downsides that make it not a good fit for some scenarios:
All in all I think there's room for both concepts to exist in Wagtail (perhaps as two distinct contrib modules?) - although then we have the question of how to communicate that to users without looking like we've implemented the same thing twice in two incompatible ways. It strikes me that wagtailredirects is a better fit for preserving legacy URLs when migrating away from an old site, whereas redirects-as-pages is a better fit for shortcuts / directing a user around the site - so perhaps there's some way of naming them to represent those two roles. |
Beta Was this translation helpful? Give feedback.
-
http://www.coactivate.org/projects/ejucovy/blog/2014/05/10/wagtail-notes-managing-redirects-as-pages/
Displaying redirects in their position in the Explorer tree seems like a pretty good idea for starters. Other notes may also be worth investigating.
Beta Was this translation helpful? Give feedback.
All reactions