Skip to content

Context and Shared Views

luke-siedle edited this page Dec 13, 2012 · 5 revisions

A context can be seen as a parent category for all pages that fall beneath it. It is directly coupled with the directory structure.

A request to \user\profile has the context of user and would usually be routed to the directory

app\views\context\desktop\user\profile.php

or whatever module the router specified (see Router). Within this file, one would need to use the following namespace View\Desktop\User and then present a function called profile.

A shared view is shared by all contexts. Each client needs a shared view index.php which instructs the application on how to load the corresponding context and how to use the context to create output. Additional sharing may take place, such as in the desktop client there is a frame.php which handles the repetitive rendering of the website shell and the merging of the shell with the web page content.

Clone this wiki locally