Documentation: Master Page Containers

Making Holes...

In general terms, a Master Page is a template with one or more place-holders where other resource documents can put content. This template may be as simple or complex as you need. It may even "chain" into another Master Page to support complex hierarchical site structures.

With the HTML Master Pages solution, a Master Page is a whole, standards-compliant HTML document that provides one or more SSI-Container DIVs within its BODY tag. These specially identified DIVs are place-holders, easily marking up your Master Page as a template. Other resource documents -- which are discussed on the next page -- "fill" those place-holders every time a visitor requests the resource document.

A Master Page with zero containers cannot accept BODY content from other resource documents but it's HEAD will still be fully merged with any resource document that is merged with it.

Examples

  1. Empty container
    <!DOCTYPE html>
    <html>
       <head>
          <title>Sample Master Page</title>
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       </head>
       <body>
          <h1>Empty Container</h1>
          <div title="SSI-Container" id="unique-id-001"></div>
       </body>
    </html>
  2. Container with default content
    <!DOCTYPE html>
    <html>
       <head>
          <title>Sample Master Page</title>
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       </head>
       <body>
          <h1>Container With Default Content</h1>
          <div title="SSI-Container" id="unique-id-002">
             <p>This content will appear in the final merged document
                only if the "current" resource document does not
                replace it.</p>
          </div>
       </body>
    </html>
  3. Multiple containers in a single Master Page
    <!DOCTYPE html>
    <html>
       <head>
          <title>Sample Master Page</title>
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       </head>
       <body>
          <h1>Multiple Containers:
             <div title="SSI-Container" id="unique-title-id">Sample</div>
          </h1>
          <div title="SSI-Container" id="unique-id-003"></div>
       </body>
    </html>
  4. Nested containers
    <!DOCTYPE html>
    <html>
       <head>
          <title>Sample Master Page</title>
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       </head>
       <body>
          <h1>Nested Containers</h1>
          <div title="SSI-Container" id="unique-outer-id">
             <p>You may occasionally find that you want to give
                resource document authors the ability to replace entire
                blocks of default content, or just a part of it. For
                these cases, HTML Master Pages permits nested
                SSI-Containers, as you see here.</p>
             <p>For example, you might provide a default contact
                for all subordinate pages while allowing later page
                authors to override the default value. However, when
                there is no reason to provide any contact method on
                a particular page, the entire surrounding block can
                be entirely removed by using an empty SSI-Filler with
                the outer SSI-Container's ID:</p>
             <p>Contact Us Via:
                <div title="SSI-Container" id="unique-inner-id">
                   ... Default Contact Method Here ...
                </div>
             </p>
             <p>Just remember that replacing the outer container's
                content from a resource document destroys the default
                content and any nested place-holders within it!</p>
          </div>
       </body>
    </html>