Function render_ref

Source
fn render_ref(
    state: &State<'_, '_>,
    reference: Value,
    root: Option<bool>,
) -> String
Expand description

A function that renders a reference. May be used in the templates as filter(using [Environment::add_filter]) or function(using [Environment::add_function]) to render a reference to another object. If the reference is shallow, it will render just the name, otherwise render it as a link. The function must be rendered without html escape. Calling this on an undefined reference will fail.