Next / Previous / Contents / TCC Help System / NM Tech homepage

8.4. regx.cgi: buildEmptyPage(): Set up an empty page

# - - -   b u i l d E m p t y P a g e

def buildEmptyPage():
    '''Set up an empty XHTML page.

      [ return a new tp.TCCPage instance with generic content ]

The navigational links are the same as in Section 6.5, “buildEmptyPage(): Set up an empty page”. Only the generic page title is different.

We set up a generic page title at this point because the desired page title will display the name of the selected region—but that comes from the CGI arguments, and we haven't even looked at those yet. Fortunately, the TCCPage class allows the titles to be changed after page creation.

    #-- 1
    # [ navList  :=  a list of tp.NavLink instances defining the
    #       navigational links ]
    navList = [
        tp.NavLink("Christmas Bird Count",
          [('', "")]),
        tp.NavLink("Zoological Data Processing",
          [('', "")]),
        tp.NavLink("Shipman's homepage",
          [('', "")]),

    #-- 2
    # [ page  :=  a new tp.TCCPage with navigation list (navList) ]
    page = tp.TCCPage("Christmas Bird Count: Regional index",
                      navList, cssUrl="")

    #-- 3
    return page