Components to show documents on your site.
import ElementorexCms.Components
<.document document={@page.body} />The document is normalized (see ElementorexCms.Document.normalize/2) and
rendered with its stylesheet. Blocks use daisyUI 5 and Tailwind classes, so
your Tailwind build has to scan the library (see the README).
Summary
Functions
Renders a document.
Functions
Renders a document.
Attributes
document- the document map (nilrenders nothing)registry- blocks to use (defaultElementorexCms.Registry.default/0)data- extra data for blocks that need it (@ctx.datain the block)class- classes for the root elementlocale- language of the texts the blocks add themselves (countdown units, placeholders…); default: the locale of the process (seeElementorexCms.I18n)record- the record a template shows (a product on its page): props bound to fields take its values (seeElementorexCms.Dynamic)source- the source ofrecord(its key, like"products"); found from the record's Ecto schema when not givensources- the sources of dynamic content (defaultElementorexCms.Sources.default/0)params- the query params of the page: loops read their page and the visitors' filters from them (params={@params}frommount/3, or@conn.params)
A template for the pages of a source:
<ElementorexCms.Components.document document={@template.body} record={@product} />Attributes
document(:map) - Defaults tonil.registry(:any) - Defaults tonil.data(:map) - Defaults to%{}.mode(:atom) - Defaults to:public. Must be one of:public, or:editor.class(:any) - Defaults tonil.locale(:string) - Defaults tonil.record(:any) - Defaults tonil.source(:any) - Defaults tonil.sources(:any) - Defaults tonil.params(:map) - Defaults to%{}.