API Reference

Theme.View Class

Defined in lib/theme/view.js:5

Description

The view object of the Theme class.

Constructor

Theme.View

(source, path, theme)
Defined in lib/theme/view.js:5

The view object of the Theme class.

Parameters

  • source String

    The full source of the view file.

  • path String

    The relative path of the view file.

  • theme Theme

Methods

_buildLocals

(locals) Object private

Clones the object and binds the helper functions.

Parameters

Returns

_resolveLayout

(name) View private

Resolves the layout path.

Parameters

Returns

  • View

invalidate

Invalidates the cache.

render

([options], callback)

Renders the view.

Parameters

renderSync

([options]) String

Renders the view synchronizedly.

Parameters

Returns

Properties

cache

private

View cache.

data

View data.

extname

The extension name of the view file. (With a prefixed dot)

path

The relative path of the view file.

source

The full path of the view file.

theme

The theme object.