Class

RezLayout

(abstract) RezLayout()

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 block
  • renderContents(): Render all content blocks to HTML
  • bindAs(): Return the binding name for this layout

View Source rez_view.js, line 511

Extends

Methods

# abstract addContent(block)

Adds a content block to this layout.

Parameters:
Name Type Description
block RezBlock

The block to add

View Source rez_view.js, line 535

Must be implemented by subclass

Error

# abstract bindAs() → {string}

Returns the binding name for this layout type.

View Source rez_view.js, line 557

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:

View Source rez_view.js, line 569

Complete HTML for this layout

string

# abstract renderContents() → {string}

Renders all content blocks to HTML.

View Source rez_view.js, line 546

Must be implemented by subclass

Error

Rendered content HTML

string