Package aquarium :: Package navigation :: Module NavigationAPI
[show private | hide private]
[frames | no frames]

Module aquarium.navigation.NavigationAPI

Document the API for navigation classes.

Navigation classes encapsulate reusable bits of site navigation. They are used by layout classes. For instance, if there is a row of buttons along the top of every page, the buttons would be stored in a navigation class, and the layout class would make use of that navigation class. This is all very natural if you're accustomed to server side includes. Navigation classes have a __call__ method that returns a string. I.e. they are usually Cheetah templates that subclass aquarium.util.AquariumTemplate. Naturally, the layout class may pass additional arguments to the navigation class's __call__ method if the method is expecting them.

Why use navigation classes? It is possible to just leave all of the navigation in the layout classes. However, doing so results in large, unreadable, unmaintainable layout classes. Furthermore, it makes it impossible to reuse the navigation in subsequent layouts. Hence, use layout classes for layout and navigation classes for navigation.

The following methods are required:

__call__(self)
Return the navigation in a string.

Generated by Epydoc 2.1 on Mon Jan 1 16:34:19 2007 http://epydoc.sf.net