Make "10-dynamic-block" more dynamic
salcode opened this issue · comments
While 10-dynamic-block
does use a dynamic block currently, it behaves in the same manner as a non-dynamic block.
It would be helpful to see the value provided by a block being dynamic (e.g. output a value that could be modified after the post was published).
Just to clarify, the current example doesn't behave in the same manner as a static block as its markup is never saved to the database. However, I completely understand what you're intending with this issue :)
I like the idea of adding a more fleshed-out example that demonstrates the benefits of a dynamic block:
- Being able to update the markup that is displayed without needing to add a deprecation and re-saving all instances of the block to see the updates.
- Querying the database for information that should not be saved as part of the block - such as latest tags, etc
From an examples point of view, the second point is much easier to demonstrate with working code as it doesn't require the same block with multiple sets of markup.