Modules | Files | Inheritance Tree | Inheritance Graph | Name Index | Config
module Synopsis::Formatter::HTML::Page
class PageFormat
Files: Synopsis/Formatter/HTML/Page.py
PageFormat-inheritance Scopes/Synopsis/Formatter/HTML/Page/TemplatePageFormat.html

Default and base class for formatting a page layout. The PageFormat class basically defines the HTML used at the start and end of the page. The default creates an XHTML compliant header and footer with a proper title, and link to the stylesheet.


Operations Summary:
 __init__(self) [Source]
 set_prefix(self, prefix)
Sets the prefix to use to correctly reference files in the document root directory. [Source]
 stylesheet(self)
Returns the relative filename of the stylesheet to use. [Source]
 prefix(self)
Returns the prefix to use to correctly reference files in the document root directory. [Source]
 page_header(self, os, title, body, headextra)
Called to output the page header to the given output stream. [Source]
 page_footer(self, os, body)
Called to output the page footer to the given output stream. [Source]

Operation Details:
  stylesheet(self)

Returns the relative filename of the stylesheet to use. The stylesheet specified in the user's config is copied into the output directory. If this page is not in the same directory, the url returned from this function will have the appropriate number of '..'s added.


  prefix(self)

Returns the prefix to use to correctly reference files in the document root directory. This will only ever not be '' if you are using the NestedFileLayout, in which case it will be '' or '../' or '../../' etc as appropraite.


  page_header(self, os, title, body, headextra)

Called to output the page header to the given output stream.

Parameters:
os - a file-like object (use os.write())
title - the title of this page
body - the body tag, which may contain extra parameters such as onLoad scripts, and may also be empty eg: for the frames index
headextra - extra html to put in the head section, such as scripts


  page_footer(self, os, body)

Called to output the page footer to the given output stream.

Parameters:
os - a file-like object (use os.write())
body - the close body tag, which may be empty eg: for the frames index