unikent / astro

MIT License
7 stars 2 forks source link

Feature/dynamic blocks #249

Closed sy238-unikent closed 6 years ago

sy238-unikent commented 6 years ago

The PR adds support to the API for "Dynamic Blocks", where a dynamic block is one which:

e.g. a "Profiles" block at /site/profiles which displays a list of staff from a database then allows viewing individual staff profiles on "virtual" pages at /site/profiles/.

Dynamic blocks must:

Dynamic page URLs are only matched via the /api/v1/routes/resolve API call (used by renderers), not via other API requests which operate on page ids.

Dynamic blocks are currently only used within the ResolvesRoutes trait and the PageTransformer, but could easily be adapted to, for example, provide extra validation logic on saving pages, etc.

See the dynamic-blocks.md file in the root of the repo for more information.

sy238-unikent commented 6 years ago

References to events removed as requested, other changes also made.