Vesthelm Engine

2.1.1 User Guide

View Class

The View class used to display pages, assign variables etc.

Calling the View Class

$View = $this->View;

Displaying Template File

For example to display Bulletin Board enhancement template file applications/bulletin_board/frontend/views/native/tpl/add-bulletin.tpl

Put following code to controller: applications/bulletin_board/frontend/controllers/Add_Bulletin.php

$this->View->display('add-bulletin');

Assigning Values to the Templates

Code in controller:

$this->View->assign('title', 'Your page title');

Template:

<!DOCTYPE HTML>
<html>
    <head>
        <title>{$title}</title>
    </head>
</html>

Assigning Page Title

For every page you can specify unique page title, just put this code to page controller:

$this->View->assign('title', 'Your page title');

Assigning Meta Description and Meta Keywords

For every page you can specify unique meta description and keywords, just put this code to page controller:

$this->View->assign('meta_description', 'Meta description');

$this->View->assign('meta_keywords', 'Meta keywords');