pub fn default_render<B: Block + ?Sized>(
block: &B,
value: &Value,
ctx: &BlockRenderCtx<'_>,
) -> Result<String, BlockError>Expand description
Walk a block’s fields and render its template.
Template lookup precedence:
block.template()if it returnsSome(path).- Otherwise
blocks/<type_name>.html.
The rendered template receives the following Tera context:
value: the block’s whole value dict (mirrors what authors actually want — addressing fields by name as{{ value.heading }}).block_type: the wiretype_name.- Every
crate::block::BlockField::Computedfield’srenderoutput ascomputed.<field_name>so templates can pull derived chips inline.
§Errors
BlockError::TemplateRender on Tera failure;
BlockError::Shape when the block value isn’t an object (the
only shape the field walker accepts).