RevTree

Create routes that match multiple URLs

Use routing patterns to handle multiple URLs with one handler.

Goal

Avoid duplicating routes and views.

Steps

  1. Identify 2+ URLs that should share behaviour.
  2. Implement a matching route.
  3. Use a parameter (or mapping) to change rendered output.

Notes

Source inspiration: hippo-prototyping discussion https://github.com/hippo-digital/hippo-prototyping/discussions/45