资 源 简 介
Introduction
Page Master is a templating engine which simply provides pre-built PHP functionality to your Views enabling:
* Master Pages, with no limit on nesting
* Access to ViewData
* Rendering of Partials
* Base Url resolution
Also, since this framework simply provides packaged PHP capabilities to your views, there is very little learning curve involved, unlike most templating languages which require you to learn a templating language with their own tags and looping structures.
Page Master is also extensible, so your code can easily make available your own templating functions without having to open the source code to Page Master.
Usage
In the Controller
Bootstrap PageMaster engine:
include "/path/to/PageMaster.php";$PM = new PageMaster();
Add ViewData as it becomes available if you want:
$PM->AddViewData("mydata",$mydata);
Now, in the views you can access $mydata via $