Simple view rendering

A simple view consist of a chunks of standard HTML 5, possibly mixed with PHP code.

The HTML code in views (e.g. the content of this file) should be rendered inside the page body using the simple view class using direct rendering or an router (see dispatcher in examples/routing). Using direct rendering is kind of pointless unless you are creating a page mixing multiple views together.


Inline PHP test

Q: Are you there?
A: Yes, I'm working!


No page decorations?

If you click on the render view link you should see the content in this file rendered using the standard template. Put context files in current directory to show menus and publish info.

Scure views

Enforce authetication in page header to create secure views. For an example on conditional hiding content (HTML elements), see conditional.php


if ($session->authenticated()) {
        throw new Exception("Authentication is required");
}