pub fn render_entity_html(
instance: &SandboxInstance,
tx: &ReadOnlyTransaction,
obj: &Value,
) -> Result<(String, String)>Expand description
Generates HTML for the given object using a specified template.
§Arguments
instance- Reference to the CachedInstance containing class specifications.tx- Read-only transaction for accessing repository data.obj- JSON object representing the data to be rendered.
§Returns
A String containing the rendered HTML if the class has an HTML body; otherwise, returns an empty string.
The function sets up a rendering environment, prepares the renderer, and attempts to render the template with the provided data.