Create routes that match multiple URLs
Use routing patterns to handle multiple URLs with one handler.
Goal
Avoid duplicating routes and views.
Steps
- Identify 2+ URLs that should share behaviour.
- Implement a matching route.
- Use a parameter (or mapping) to change rendered output.
Notes
Source inspiration: hippo-prototyping discussion https://github.com/hippo-digital/hippo-prototyping/discussions/45