menu

SiteGenesis / Server-side JS / Module: views/View

Standard view used to render most templates.

Source:

Classes

View
View

Methods

(abstract, inner) View/render(templateName) → {module:views/View~View}

Renders the current view with the given template. This function gets all of the customer, request, and session information that might be needed to render the template and passes it to the template for rendering.

Parameters:
Name Type Description
templateName String

The path and name of the template to render. The base of the path is assumed to be the templates/default folder in the cartridge, unless a locale is selected, in which case it is templates locale. If the template is not found in the current cartridge, the cartridge path is searched until a cartridge containing it is found.

The name of the template is the file name without the file extension.

Source:
Returns:

Returns the current view.

Type
module:views/View~View
Example
app.getView().render('account/accountoverview');