Expand description
Render a resolved Page through Tera.
The flow:
- Look up the
PageTyperow viapage.page_type_id. - Find the registered
PageTypeHandlerbytype_name. - Ask the handler for its typed extension as JSON
(
load_extension). - Build a Tera context with
page/page_type/extension/children/ancestors/breadcrumbs. - Render the page’s own
template_overridewhen it names a template that exists, elsepage_type.default_template(seepick_template).
Functions§
- render
- Render
pageto an HTTP response. On any failure (missing page-type row, missing handler, template error) returns a 500/404 response with a short diagnostic body. - render_
negotiated render, plus the client’s media-type preference.- render_
preview - Render
pageusing virtual extension data drawn from a posted formHashMapinstead of the persisted row. The page row itself is still rendered verbatim, so callers should pre-overlay the form’s canonical fields onto thePagebefore calling. - render_
with_ route - Render
pageas a routable-page hit. The matched route’s name + named capture groups are exposed to the template asroute_nameandroute_captures; the handler’sroute_contextoverride gets a chance to inject additional ctx before the framework keys are stamped.