Constructor
# abstract new RezLayout()
Abstract base class for layout blocks.
A layout is a special type of block that can contain other blocks as content. Layouts have their own template that wraps the rendered content of their child blocks.
Subclasses must implement:
addContent(block): Add a content blockrenderContents(): Render all content blocks to HTMLbindAs(): Return the binding name for this layout
Extends
Methods
# abstract addContent(block)
Adds a content block to this layout.
Parameters:
| Name | Type | Description |
|---|---|---|
block |
RezBlock
|
The block to add |
Must be implemented by subclass
Error
# abstract bindAs() → {string}
Returns the binding name for this layout type.
Must be implemented by subclass
Error
The binding name
string
# html() → {string}
Renders this layout to HTML.
Renders content first, then applies the layout's template with the content and all bindings.
- Overrides:
Complete HTML for this layout
string
# abstract renderContents() → {string}
Renders all content blocks to HTML.
Must be implemented by subclass
Error
Rendered content HTML
string