## Content and DefaultMaster

Every application generates only a few part of the page, I will call it "content" to make the difference with the "header" (not to be confused with html "header" and html "body". Both header and content I will talk about are part of the "body" section of the html page).

From here there are already 2 things to distinguish : the general layout of the page (nearly CSS based) and the look of the elements of the content part, which are a "theme" (I will come back later on this).

When you enter a URL in your browser, what basically happens is :

- the called application will be executed and will generate a short html code (content), then pass it to the DefaultMaster
- the DefaultMaster will generate all the header information (html header, body tags, and actually all the menus and information displayed above and below the content), and will then insert inside what it has received from the application.
- the complete html page generated is sent to the browser for display

To specify the place where the code will be inserted in the DefaultMaster, the slave command is used. That notion of master and slave is really important in the .LRN / OpenACS context : a bunch of code calls its master, and the master insert the code received at the place of the slave command.

To simplify, here is how we could see the schematics generation of the page shown below :

The DefaultMaster is a parameter you can change in "parameters" for "Main Site" in the site-map page. Its value is stored in the database in the table "apm_parameter_values" at the id of "DefaultMaster" from the table "apm_parameters".