Overview
php scripted modules that implement functionality (e.g. a style definition, menu or discussion board)
a parser that can construct the html page by reading input files, determining which modules to call and then combine output of the modules
files with specific extension (say .my) that specifiy html + calling tags for each module
Walkthrough
To demonstrate how it works, let's see a file called hello.my:
<title>Hello world</title>
<my-style name=test>
hello world
If a request is being made for index.my, the webserver redirects this request to the php parser, which just scans for <my- .. > tags. It finds the 'style' tag, and looks for the module style.php in its module directory.
The file style.php is included and the function handle_style ($arglist) is called, where $arglist is an associative array of all specified parameters to the tag (here:
<?php $arglist[name] = "test"; ?>
).
The handle_style function must return a string containing html. How the module determines the html doesn't concern the system. Say, the handle_style module returns <font face=Arial size=2 color=yellow> and the parser includes this in the final html.