-
Notifications
You must be signed in to change notification settings - Fork 1
Context and Shared Views
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.