Render helpers for Phoenix LiveView. Dispatches sections to your app's function components by template name.
Summary
Functions
Renders child sections for a specific field. Use inside section components to render nested sections.
Renders a layout by dispatching its header sections, yielding the inner block, then dispatching its footer sections.
Resolves a media slug to its serving path.
Renders a single section by dispatching to the matching function component
in module. Passes @fields, @children, and @module as assigns.
Renders a list of sections by dispatching each to the corresponding
function component in module. The component function name matches
the section's template name.
Functions
Renders child sections for a specific field. Use inside section components to render nested sections.
Example
def gallery(assigns) do
~H"""
<div class="gallery">
<h2>{@fields["title"]}</h2>
<Brix.Render.child_sections module={@module} children={@children} field="slides" />
</div>
"""
endAttributes
module(:atom) (required)children(:map) (required)field(:string) (required)
Renders a layout by dispatching its header sections, yielding the inner block, then dispatching its footer sections.
Attributes
layout(:map) (required)module(:atom) (required)
Slots
inner_block(required)
Resolves a media slug to its serving path.
Renders a single section by dispatching to the matching function component
in module. Passes @fields, @children, and @module as assigns.
Renders a list of sections by dispatching each to the corresponding
function component in module. The component function name matches
the section's template name.
Attributes
sections(:list) (required)module(:atom) (required)