|  | HTML |  |

|  | Splash! |  |

|  | PostScript |  |

| Template Toolkit Examples: HTML Library: Headers, Footers and Pages |

|  | index |  |

|  | rgb |  |

|  | headers |  |

|  | lists |  |

|  | links |  |

|  | tables |  |

|  | bars |  |

|  | menus |  |

# Headers, Footers and Pages

These elements are for adding standard headers and footers to your HTML pages.

Source #1:

    [% PROCESS html/header %]

HTML Output #1:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <html>
    <head>
    <title></title>
    </head>
    <body bgcolor="#ffffff">

Source #2:

    [% INCLUDE html/header
         title = 'Template Toolkit'
         bgcol = '#ffffff'
    %]

HTML Output #2:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <html>
    <head>
    <title>Template Toolkit</title>
    </head>
    <body bgcolor="#ffffff">

Source #3:

    [% headers = BLOCK %]
    <META name="description" content="Template Toolkit">
    <META name="REVISIT-AFTER" content="14 days">
    <META name="keywords" content="Templates, Web, ...">
    [% END %]

    [% INCLUDE html/header
         title   = 'Template Toolkit'
         bgcol   = '#ffffff'
    %]

HTML Output #3:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <html>
    <head>
    <title>Template Toolkit</title>
    <META name="description" content="Template Toolkit">
    <META name="REVISIT-AFTER" content="14 days">
    <META name="keywords" content="Templates, Web, ...">
    </head>
    <body bgcolor="#ffffff">

Source #4:

    [% INCLUDE html/header
         title = 'Template Toolkit'
         bgcol = '#ffffff'
    %]

    ...page content goes here...

    [% PROCESS html/footer %]

HTML Output #4:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <html>
    <head>
    <title>Template Toolkit</title>
    </head>
    <body bgcolor="#ffffff">
    ...page content goes here...
    </body>
    </html>

Source #5:

    [% WRAPPER html/page
         title = 'Template Toolkit'
         bgcol = '#ffffff'
    %]

    ...page content goes here...

    [% END %]

HTML Output #5:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <html>
    <head>
      <title></title>
    </head>
    <body>
    ...page content goes here...
    </body>
    </html>

Source #6:

    [% WRAPPER html/page
         title = 'Template Toolkit'
         bgcol = '#ffffff'
         headers = '<META name="keywords" content="...">'
    %]

    ...page content goes here...

    [% END %]

HTML Output #6:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <html>
    <head>
      <title></title>
    </head>
    <body>
    ...page content goes here...
    </body>
    </html>

Source #7:

    [% headers = BLOCK %]
    <META name="description" content="Template Toolkit">
    <META name="REVISIT-AFTER" content="14 days">
    <META name="keywords" content="Templates, Web, ...">
    [% END %]

    [% WRAPPER html/page
         title = 'Template Toolkit'
         bgcol = '#ffffff'
    %]

    ...page content goes here...

    [% END %]

HTML Output #7:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <html>
    <head>
      <title></title>
    </head>
    <body>
    ...page content goes here...
    </body>
    </html>