z_scomp (zotonic_core v1.0.0-rc.17)

Module for rendering and caching scomps. Scomps can be caching and non caching, depending on the passed arguments and the results of the scomp's varies/2 function.

Summary

Functions

Render the names scomp, Args are the scomp arguments and Vars are the variables given to the template

Functions

render(ScompName, Args, Vars, Context)

-spec render(term(), list(), map(), z:context()) -> {ok, z:context()} | {ok, iolist()} | {error, term()}.

Render the names scomp, Args are the scomp arguments and Vars are the variables given to the template

render_all(ScompName, Args, Vars, Context)

render_optional(ScompName, Args, Vars, Context)