Package trac :: Package web :: Module chrome :: Class INavigationContributor

Class INavigationContributor

source code

    object --+    
             |    
core.Interface --+
                 |
                INavigationContributor

Extension point interface for components that contribute items to the navigation.
Instance Methods
 
get_active_navigation_item(req)
This method is only called for the IRequestHandler processing the request.
source code
 
get_navigation_items(req)
Should return an iterable object over the list of navigation items to add, each being a tuple in the form (category, name, text).
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

get_active_navigation_item(req)

source code 

This method is only called for the IRequestHandler processing the request.

It should return the name of the navigation item to be highlighted as active/current.

get_navigation_items(req)

source code 

Should return an iterable object over the list of navigation items to add, each being a tuple in the form (category, name, text).

The category determines the location of the navigation item and can be mainnav or metanav. The name is a unique identifier that must match the string returned by get_active_navigation_item. The text is typically a link element with text that corresponds to the desired label for the navigation item, and an href.