view

view

new view()

This is the main view

Methods

(static) checkCodeBlocks(templateData)

Checks the content HMTL for code blocks and executes the blocks and inserts the content into the template

Parameters:
Name Type Description
templateData String

The template Data to check

(static) checkDisplay(display)

Extracts the correct display part for the template since a template file can contain multiple display sections that would be rendered accoring to display type

Parameters:
Name Type Description
display String

The display node name i.e. login would be a node

(static) checkVariables(templateData)

Check the content variables and replaces the required variables

Parameters:
Name Type Description
templateData String

The template Data to check

(static) executeBlock(block)

Executes a code block from within the html and returns the response

Parameters:
Name Type Description
block String

The code block to execute

(static) render(template, content, callback, display)

Render the view, retrieve the main an page template, whilst rendering the variable content in the template

Parameters:
Name Type Description
template String

The template data for the page

content String

The content data for the page

callback String

The callback to execute

display String

The display node name i.e. login would be a node