unikent / astro

MIT License
7 stars 2 forks source link

Modify dynamic block behaviour to only add attributes to the data. #254

Closed sy238-unikent closed 6 years ago

sy238-unikent commented 6 years ago

Any attributes that a dynamic block wishes to add must already be defined within the definition.json for that block.

Attempting to inject any other attributes will throw an exception.

Dynamic attributes are injected into a "dynamic" attribute in the page json for that block.

Currently these dynamic attributes are not available within the editor.

The renderer will need to be updated to allow access to these attributes within templates using just "dyanmic.{attribute-name}".